Add a launch argument for full screen (#663)

* per user config should be .gitignored

* add comment surrounding gitignore update

* make it wildcard

* add fullscreen to launch option struct

* remove redundant forward declaration and use fullscreen launch option in main
This commit is contained in:
Vincent Zhang
2026-03-05 23:54:30 -05:00
committed by GitHub
parent 5cbdf27b46
commit 73cc345f54
3 changed files with 7 additions and 23 deletions

View File

@@ -110,6 +110,7 @@ struct Win64LaunchOptions
{
int screenMode;
bool serverMode;
bool fullscreen;
};
static void CopyWideArgToAnsi(LPCWSTR source, char* dest, size_t destSize)
@@ -256,6 +257,8 @@ static Win64LaunchOptions ParseLaunchOptions()
g_Win64MultiplayerPort = (int)port;
}
}
else if (_wcsicmp(argv[i], L"-fullscreen") == 0)
options.fullscreen = true;
}
LocalFree(argv);
@@ -1245,7 +1248,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
}
// Restore fullscreen state from previous session
if (LoadFullscreenOption() && !g_isFullscreen)
if (LoadFullscreenOption() && !g_isFullscreen || launchOptions.fullscreen)
{
ToggleFullscreen();
}