Headless: Don't end a --debugger-run run when the CPU stops

A stop ended the run unless the CPU had been told to break at start, which is
only --debugger. So under --debugger-run, pausing from the debugger (or any
breakpoint) exited the process. Key it on whether the debugger is on instead.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-09-25 12:35:41 -06:00
1 parent be30966079
commit e310d144c9
1 file changed
+5 -1
+5 -1
View File
@@ -328,6 +328,8 @@ struct AutoTestOptions {
// sceMpeg and sceMp4 run the firmware module by default now and fall back to the HLE wherever
// none is installed, which must not fail every run on such a machine.
int requiredDisableHLE;
// The WebSocket debugger is on (--debugger or --debugger-run), so a stop is its to resume.
bool debugger;
};
// Ends a frame of the draw context the way the app does, presenting it. Unpresented frames never
@@ -482,7 +484,8 @@ static bool RunAutoTest(GraphicsContext *graphicsContext, CoreParameter &corePar
gpu->BeginHostFrame(g_Config.GetDisplayLayoutConfig(DeviceOrientation::Landscape));
}
}
if (coreState == CORE_STEPPING_CPU && !coreParameter.startBreak) {
// Without a debugger nothing can resume a stop, so it ends the run.
if (coreState == CORE_STEPPING_CPU && !opt.debugger) {
break;
}
bool debugger = false;
@@ -728,6 +731,7 @@ int main(int argc, const char* argv[]) {
testOptions.printEqualLines = cmdLineOptions.printEqualLines.value_or(false);
testOptions.maxScreenshotError = cmdLineOptions.maxScreenshotError.value_or(0.0);
testOptions.requiredDisableHLE = cmdLineOptions.disableHLE.value_or(0);
testOptions.debugger = cmdLineOptions.DebuggerPort().has_value();
bool fullLog = cmdLineOptions.enableLogging.value_or(false);
const char *stateToLoad = cmdLineOptions.stateToLoad.has_value() ? cmdLineOptions.stateToLoad.value().c_str() : nullptr;