mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-11-24 06:19:25 +03:00
Make invalid arguments not abort loading
The previous behavior was behavior that only CLI programs usually have; NOT games. The game refusing to launch due to unknown arguments is a headache for switching branches (which may add arguments), and some esoteric launcher setups. This commit resolves those. Due to the way this code is written, it will only warn about the last invalid argument; a complete overhaul could be done eventually, but this is okay for now.
This commit is contained in:
1 parent
42caa232fa
commit
8a76433eec
1 file changed
+2
-6
@@ -554,15 +554,11 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (invalid_arg > 0)
|
if (invalid_arg > 0)
|
||||||
{
|
{
|
||||||
vlog_error("Error: invalid option: %s", argv[invalid_arg]);
|
vlog_warn("Warning: invalid option: %s", argv[invalid_arg]);
|
||||||
keep_console_open(open_console);
|
|
||||||
VVV_exit(1);
|
|
||||||
}
|
}
|
||||||
else if (invalid_partial_arg > 0)
|
else if (invalid_partial_arg > 0)
|
||||||
{
|
{
|
||||||
vlog_error("%s option requires one argument.", argv[invalid_partial_arg]);
|
vlog_warn("%s option requires one argument.", argv[invalid_partial_arg]);
|
||||||
keep_console_open(open_console);
|
|
||||||
VVV_exit(1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (print_version)
|
if (print_version)
|
||||||
|
|||||||
Reference in new issue
Block a user