diff options
Diffstat (limited to 'platform/osx/godot_main_osx.mm')
| -rw-r--r-- | platform/osx/godot_main_osx.mm | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/platform/osx/godot_main_osx.mm b/platform/osx/godot_main_osx.mm index 053a7f4a1d..722928ad60 100644 --- a/platform/osx/godot_main_osx.mm +++ b/platform/osx/godot_main_osx.mm @@ -74,16 +74,11 @@ int main(int argc, char **argv) { // We must override main when testing is enabled. TEST_MAIN_OVERRIDE - if (os.get_open_with_filename() != "") { - char *argv_c = (char *)malloc(os.get_open_with_filename().utf8().size()); - memcpy(argv_c, os.get_open_with_filename().utf8().get_data(), os.get_open_with_filename().utf8().size()); - err = Main::setup(argv[0], 1, &argv_c); - free(argv_c); - } else { - err = Main::setup(argv[0], argc - first_arg, &argv[first_arg]); - } + err = Main::setup(argv[0], argc - first_arg, &argv[first_arg]); - if (err != OK) { + if (err == ERR_HELP) { // Returned by --help and --version, so success. + return 0; + } else if (err != OK) { return 255; } |