Let a save Commit that is under way finish before the crash report or a fatal error ends the process, for at most two seconds.

The game's Commit returns once the commit is queued, so the game may already have reported the save as done while its thread still copied; ending then left an unfinished copy that the next start rolled back.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-10 23:26:01 -05:00
parent 5ddff078c3
commit 7ccb958c47
4 changed files with 24 additions and 0 deletions

View File

@@ -313,6 +313,7 @@ static void crash_handler(const PlatCrash *x) {
}
rt_fatal_notes(); // the card, its driver and the memory settings in effect (vk_device.c fatal_note)
kern_free_cores_note();
fs_save_crash_wait(); // a save the game already reported as done finishes first (bounded; fs_host.c)
rtss_limit_restore(); // after the report: RivaTuner Statistics Server's profile as it was
fflush(stderr);
prof_sampler_write(); // NX2NAVI_PROFILE: what was sampled until the crash (it gives up after 2 s if the sampler hangs)