mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-13 01:29:41 +01:00
Headless: Hold the game until a --state has been applied
The state is read and decompressed on a worker while the game keeps booting. On a slow host that got far enough to reach different code, and with MX vs. ATV Untamed without a firmware, its boot crash, before the state landed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a3309cdc2d
commit
52b0a13f94
1 file changed
+8
@@ -566,6 +566,14 @@ static bool RunAutoTest(GraphicsContext *graphicsContext, CoreParameter &corePar
|
||||
double statsStart = -1.0;
|
||||
int statsLastFlips = 0;
|
||||
std::vector<std::pair<double, Path>> screenshotsAt = opt.screenshotsAt;
|
||||
// Hold the game until a --state has been applied. Otherwise it keeps booting while the state is
|
||||
// read, which on a slow host can reach a different point (even a crash) before the state lands.
|
||||
while (g_stateLoadPending && time_now_d() < wallDeadline) {
|
||||
SaveState::Process();
|
||||
if (g_stateLoadPending) {
|
||||
sleep_ms(1, "state-load");
|
||||
}
|
||||
}
|
||||
coreState = coreParameter.startBreak ? CORE_STEPPING_CPU : CORE_RUNNING_CPU;
|
||||
|
||||
// The XMB starting a game, or a game going back to it: boot that, the way the app does, and keep
|
||||
|
||||
Reference in new issue
Block a user