Add --nickname, and give each adhoc_session.py instance its own

Games that show the system nickname in their lobbies can then tell the
instances apart. Also: press --times N --every S for menus that need
several presses, and start clears the last session's screenshots, which
could otherwise pass for this one's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-30 10:08:10 +01:00
1 parent f0c6a26087
commit 214b14fe63
4 files changed
+28 -7

No files matched your search

+5
View File
@@ -257,6 +257,7 @@ static const CommandLineParam g_autoParams[] = {
{POFF(instance), CmdParamType::Int, "instance", '\0', "Run as instance N of several talking to each other over ad hoc (own 127.0.0.N address and MAC)", CmdLineMode::Headless},
{POFF(realtime), CmdParamType::Bool, "realtime", '\0', "Run at PSP speed instead of as fast as possible", CmdLineMode::Headless},
{POFF(adhocServer), CmdParamType::Bool, "adhoc-server", '\0', "Run the built-in ad hoc server"},
{POFF(nickname), CmdParamType::String, "nickname", '\0', "The PSP's nickname (System settings), for this run only"},
{POFF(lagSync), CmdParamType::Bool, "lag-sync", '\0', "Keep emulated time in step with the wall clock every millisecond, not every frame (the Force real clock sync setting)"},
{POFF(frameStats), CmdParamType::Bool, "frame-stats", '\0', "Print flips per emulated second at the end of the run, counted from --state's load", CmdLineMode::Headless},
{POFF(maxScreenshotError), CmdParamType::Double, "max-mse", '\0', "Maximum allowed MSE error for screenshot comparison", CmdLineMode::Headless},
@@ -574,6 +575,10 @@ void CommandLineOptions::ApplyToConfig() const {
g_Config.bEnableAdhocServer = adhocServer.value();
g_Config.DoNotSaveSetting(&g_Config.bEnableAdhocServer);
}
if (nickname.has_value()) {
g_Config.sNickName = nickname.value();
g_Config.DoNotSaveSetting(&g_Config.sNickName);
}
if (lagSync.has_value()) {
g_Config.bForceLagSync = lagSync.value();
g_Config.DoNotSaveSetting(&g_Config.bForceLagSync);