Ignore process serial number (-psn_...) command line argument passed by macOS Gatekeeper.

This commit is contained in:
bruvzg 2020-04-09 20:06:43 +03:00
parent 91f7af48eb
commit 457dc5056d
No known key found for this signature in database
GPG key ID: FCED35F1CECE0D3A

View file

@ -286,6 +286,14 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
#endif
while (I) {
#ifdef OSX_ENABLED
// Ignore the process serial number argument passed by macOS Gatekeeper.
// Otherwise, Godot would try to open a non-existent project on the first start and abort.
if (I->get().begins_with("-psn_")) {
I = I->next();
continue;
}
#endif
List<String>::Element *N = I->next();