[macOS] Improve file association handling, and allow URL schema handling.
This commit is contained in:
parent
8ec6c075bd
commit
238ac2fdd5
7 changed files with 63 additions and 34 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue