Skip to content

Commit c48f178

Browse files
committed
Can now specify --vsync true or --vsync false in addition to 1/0.
1 parent 396cf1b commit c48f178

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

es-app/src/main.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ bool parseArgs(int argc, char* argv[], unsigned int* width, unsigned int* height
5959
Settings::getInstance()->setBool("Windowed", true);
6060
}else if(strcmp(argv[i], "--vsync") == 0)
6161
{
62-
Settings::getInstance()->setBool("VSync", atoi(argv[i + 1]));
62+
bool vsync = (strcmp(argv[i + 1], "true") == 0 || strcmp(argv[i + 1], "1") == 0) ? true : false;
63+
Settings::getInstance()->setBool("VSync", vsync);
6364
i++; // skip vsync value
6465
}else if(strcmp(argv[i], "--scrape") == 0)
6566
{
@@ -79,7 +80,7 @@ bool parseArgs(int argc, char* argv[], unsigned int* width, unsigned int* height
7980
"--debug even more logging\n"
8081
"--scrape scrape using command line interface\n"
8182
"--windowed not fullscreen, should be used with --resolution\n"
82-
"--vsync [0/1] turn vsync on or off (default is on)\n"
83+
"--vsync [1/true or 0/false] turn vsync on or off (default is on)\n"
8384
"--help, -h summon a sentient, angry tuba\n\n"
8485
"More information available in README.md.\n";
8586
return false; //exit after printing help

0 commit comments

Comments
 (0)