You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Add support for command-line user arguments.
Implements the standard Unix double dash (--) commandline argument: * Arguments after a double dash (--) are ignored by Godot and stored for the user. * User can access them via `OS.get_cmdline_user_args()` Example: `godot.exe scene_to_run.tscn --fullscreen -- --start-level 2`
This commit is contained in:
@@ -105,7 +105,7 @@ int test_main(int argc, char *argv[]) {
|
||||
for (int i = 0; i < argc; i++) {
|
||||
args.push_back(String::utf8(argv[i]));
|
||||
}
|
||||
OS::get_singleton()->set_cmdline("", args);
|
||||
OS::get_singleton()->set_cmdline("", args, List<String>());
|
||||
|
||||
// Run custom test tools.
|
||||
if (test_commands) {
|
||||
|
||||
Reference in New Issue
Block a user