Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DolphinQt: Ignore "-psn" command line option on macOS #9005

Merged
merged 1 commit into from Aug 8, 2020

Conversation

OatmealDome
Copy link
Member

On an application's first launch on macOS, a command line option matching the format "-psn_X_XXXXXX" is passed. This is to set the "ProcessSerialNumber", something used by the legacy Process Manager from Carbon. optparse recognizes it as an unknown option and immediately quits, so the application appears to crash.

This PR makes DolphinQt ignore the "-psn" command line option if it's found.

@OatmealDome
Copy link
Member Author

Fixed lint (I think).

@BhaaLseN
Copy link
Member

BhaaLseN commented Aug 5, 2020

Is this guaranteed to be the last argument being passed? Like, does it also happen if you happen it for the first time using a command line argument like a DOL or so to run? Or does that only happen from Finder (being passed on first run)?

@OatmealDome
Copy link
Member Author

Is this guaranteed to be the last argument being passed?

There's no documentation for this argument that I can find, so I can't definitively say that this is true. However, from what I can tell, whenever it does appear in the arguments list it is always the sole one. If you try and pass arguments on the first run (for example, open -a Dolphin.app --args file.dol), it doesn't get included.

Like, does it also happen if you happen it for the first time using a command line argument like a DOL or so to run? Or does that only happen from Finder (being passed on first run)?

It does not appear if you run the executable directly from the command line. Instead, it appears to be added when the application is opened via LaunchServices (via the Finder, open without --args, AppleScript, etc).

@Tilka Tilka merged commit 4c64446 into dolphin-emu:master Aug 8, 2020
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants