You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
[macOS] Improve file association handling, and allow URL schema handling.
This commit is contained in:
@@ -621,11 +621,18 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
||||
/* argument parsing and main creation */
|
||||
List<String> args;
|
||||
List<String> main_args;
|
||||
List<String> platform_args = OS::get_singleton()->get_cmdline_platform_args();
|
||||
|
||||
// Add command line arguments.
|
||||
for (int i = 0; i < argc; i++) {
|
||||
args.push_back(String::utf8(argv[i]));
|
||||
}
|
||||
|
||||
// Add arguments received from macOS LaunchService (URL schemas, file associations).
|
||||
for (const String &arg : platform_args) {
|
||||
args.push_back(arg);
|
||||
}
|
||||
|
||||
List<String>::Element *I = args.front();
|
||||
|
||||
while (I) {
|
||||
|
||||
Reference in New Issue
Block a user