mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-17 07:09:57 -04:00
Keep the crash report's exception filter in place, and write the game's exit code into its log from the launcher.
The last-chance exception filter is set at the start, before the GPU driver and the other DLLs load. A DLL that sets its own filter later takes its place, and a fault in that DLL then ends the game with no FATAL line in the log. Two 0.6.0 logs from an RX 7800 XT end that way on the title screen. Once a second the filter is now put back and the module that replaced it is logged (NX2NAVI_CRASH_FILTER_GUARD, default 1). When the game ends with a nonzero code, the launcher adds that code, in hex with its meaning, to the end of logs\nx2navi.log, so a fail-fast exit that no handler in the process can see still shows in the log a player sends. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1051,6 +1051,7 @@ void plat_mem_fault_hook(int (*fn)(uint64_t addr)) {
|
||||
}
|
||||
|
||||
void plat_crash_context(const char *s) { (void)s; } // the Windows crash notes only
|
||||
int plat_crash_filter_reassert(char *who, size_t n) { (void)who, (void)n; return 0; } // Windows only
|
||||
|
||||
// plat_jmp_save / plat_jmp_go (platform.h): leaf code that does not move rsp before it leaves, as on Windows.
|
||||
_Static_assert(sizeof(PlatJmp) == 72 && __builtin_offsetof(PlatJmp, mxcsr) == 64, "plat_jmp_save layout");
|
||||
|
||||
Reference in New Issue
Block a user