From 238ac2fdd5e9d93f51a32d9341c5b70eb66bb491 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Thu, 7 Jul 2022 10:57:22 +0300 Subject: [macOS] Improve file association handling, and allow URL schema handling. --- main/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'main') diff --git a/main/main.cpp b/main/main.cpp index f7c192001b..eb401cd9ef 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -621,11 +621,18 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph /* argument parsing and main creation */ List args; List main_args; + List 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::Element *I = args.front(); while (I) { -- cgit v1.2.3