cli: add --show-fps to the CLI launcher (#3860)

* cli: add `--show-fps` to the CLI launcher

* fix: clang-format

* nit: PascalCase -> camelCase
This commit is contained in:
AlpinDale
2025-12-09 00:32:54 +04:30
committed by GitHub
parent 65f0b07c34
commit de6c5bbb83
5 changed files with 26 additions and 2 deletions

View File

@@ -67,6 +67,7 @@ int main(int argc, char* argv[]) {
"values, ignores the config file(s) entirely.\n"
" --config-global Run the emulator with the base config file "
"only, ignores game specific configs.\n"
" --show-fps Enable FPS counter display at startup\n"
" -h, --help Display this help message\n";
exit(0);
}},
@@ -174,13 +175,15 @@ int main(int argc, char* argv[]) {
game_folder = folder;
}},
{"--wait-for-debugger", [&](int& i) { waitForDebugger = true; }},
{"--wait-for-pid", [&](int& i) {
{"--wait-for-pid",
[&](int& i) {
if (++i >= argc) {
std::cerr << "Error: Missing argument for --wait-for-pid\n";
exit(1);
}
waitPid = std::stoi(argv[i]);
}}};
}},
{"--show-fps", [&](int& i) { Config::setShowFpsCounter(true); }}};
if (argc == 1) {
if (!SDL_ShowSimpleMessageBox(