implement user mode catchable exceptions, refactor system status codes to use NTLSTATUS_ prefix, update build scripts to use shared literal macros for linker arguments, update named queue lifetime cleanup to include KeNamedQueueUnpublishHandle.

This commit is contained in:
maksw committed 2026-06-27 20:38:43 +02:00
1 parent 1f5477cf66
commit b7fcfce6f7
140 files changed
+7649 -3943

No files matched your search

+14 -7
View File
@@ -173,7 +173,7 @@ static int doom_eof_wrapper(void* handle)
static void doom_gettime_wrapper(int* sec, int* usec)
{
uint64_t frequency = 0;
if (SysGetTickFrequency(&frequency) != STATUS_SUCCESS || !frequency) {
if (SysGetTickFrequency(&frequency) != NTLSTATUS_SUCCESS || !frequency) {
*sec = 0;
*usec = 0;
return;
@@ -278,7 +278,7 @@ static bool g_prev_key[KEYMAP_COUNT];
static bool ntlite_key_down(INPUT_KEY key)
{
bool down = false;
return SysIsKeyDown(key, &down) == STATUS_SUCCESS && down;
return SysIsKeyDown(key, &down) == NTLSTATUS_SUCCESS && down;
}
static void poll_input(void)
@@ -309,9 +309,16 @@ static uint32_t g_surface_pitch_pixels;
static void init_surface(void)
{
uint32_t s = SysCreateSurface(DISP_W, DISP_H, SYS_SURFACE_FORMAT_XRGB8888,
SYS_SURFACE_FLAG_NONE, &g_surface_handle);
if (s != STATUS_SUCCESS || !g_surface_handle) {
SYS_CREATE_SURFACE_REQUEST req;
memset(&req, 0, sizeof(req));
req.Size = sizeof(req);
req.Width = DISP_W;
req.Height = DISP_H;
req.Format = SYS_SURFACE_FORMAT_XRGB8888;
req.Flags = SYS_SURFACE_FLAG_NONE;
req.HandleOut = &g_surface_handle;
uint32_t s = SysCreateSurface(&req);
if (s != NTLSTATUS_SUCCESS || !g_surface_handle) {
doom_print_wrapper("doom: SysCreateSurface failed\n");
SysExitProcess(1);
}
@@ -319,7 +326,7 @@ static void init_surface(void)
void* base = 0;
uint32_t pitchBytes = 0;
s = SysMapSurface(g_surface_handle, &base, &pitchBytes);
if (s != STATUS_SUCCESS || !base || pitchBytes < DISP_W * sizeof(uint32_t)) {
if (s != NTLSTATUS_SUCCESS || !base || pitchBytes < DISP_W * sizeof(uint32_t)) {
doom_print_wrapper("doom: SysMapSurface failed\n");
SysExitProcess(1);
}
@@ -359,7 +366,7 @@ static void render_frame(const uint8_t* rgba)
DISPLAY_RECT rect = { 0, 0, DISP_W, DISP_H };
uint32_t code = SysPresentSurface(g_surface_handle, &rect, 1);
if (code != STATUS_SUCCESS) {
if (code != NTLSTATUS_SUCCESS) {
SysExitProcess(code);
}
}