mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-19 21:39:58 -04:00
Stop a second copy of the game before the shader prewarm, not after it.
The one-game-per-profile lock was taken at the first storage use, after the boot prewarm. A second copy started while the game ran (a second Play, a shortcut) spent 14 to 30 s translating and building on every core and committed about 10.9 GB before it ended with "another copy of the game is running", enough to bring a 48 GB machine to its commit limit and stall the copy being played. rt_boot now takes the lock first; storage_init takes it again, which plat_lock_file answers from the handle it already holds. A restart from the settings menu is unaffected: main waits for the previous process to exit before rt_boot.
This commit is contained in:
committed by
chrg6
parent
9bba578e58
commit
59069502f3
@@ -57,6 +57,8 @@ void fs_trace(const char *what, const char *path); // NX2NAVI_TRACE=fs:
|
||||
// ---- fs_host.c
|
||||
void fs_host_set_profile(const char *dir); // profile directory; before the first storage mount only
|
||||
// (default rt_config()->profile)
|
||||
void fs_host_lock_profile(void); // the one-game-per-profile lock; fatal when another copy
|
||||
// holds it (rt_boot, before the prewarm; storage_init)
|
||||
int fs_save_busy(void); // a save is being written: a save file open for writing,
|
||||
// or save data changed in the last 3 s and not committed
|
||||
void fs_save_flush(void); // wait for a save Commit still running in the background;
|
||||
|
||||
Reference in New Issue
Block a user