mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-16 01:49:58 -04:00
win32.c con_ctrl returned FALSE for a second Ctrl+C, Ctrl+Break or close while the first one's end ran, so the next handler, the default one, ran ExitProcess at once: a save Commit in flight was cut (the next start rolls it back) and every library's detach ran. Only a game started from a console has the handler; the launcher starts it with no console. The second event now waits for a Commit under way through fs_save_crash_wait (2 s at most, no lock; weak in win32.c for builds without fs_host.c, as dispatch.c has it) and ends the process with plat_exit and STATUS_CONTROL_C_EXIT, the code the default handler gives. The force-quit stays; it takes up to 2 s longer when a Commit runs. Not reproduced before the change (a play-test item from a console: Ctrl+C twice). By review; fatal_exit_check, logq_check and save_share_check, which link win32.c beside a weak or a strong fs_save_crash_wait, and the compile checks pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>