mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-24 21:55:57 +00:00
Offer Restart now under the button prompts while they change after restart
The row opens a confirmation; Restart writes totk.ini, closes the game as Quit game does and starts totk.exe again with the same command line and environment (plat_restart). The new process waits until the old one is gone before it moves the log and opens the saves (plat_restart_wait), and the confirmation waits while the game writes a save. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
19fb3a75c9
commit
703e721bf8
10 files changed
+138
-11
No files matched your search
@@ -512,6 +512,9 @@ static void portable_paths(RtConfig *c) {
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
mem_init(); // first: claim the guest address space before anything else can land there; reads totk.ini
|
||||
// A restart from the settings menu (gfx_window.c relaunch) starts this process while the one it replaces is still
|
||||
// exiting: its log, RomFS and saves are free once it is gone.
|
||||
if (plat_restart_wait(30000) < 0) rt_log("restart: the previous process still runs after 30 s; starting anyway");
|
||||
setvbuf(stdout, NULL, _IONBF, 0);
|
||||
setvbuf(stderr, NULL, _IONBF, 0);
|
||||
AddVectoredExceptionHandler(0, crash_handler);
|
||||
|
||||
Reference in new issue
Block a user