mirror of
https://github.com/mpv-player/mpv
synced 2025-04-27 05:39:21 +00:00
macosx_application: fix file opening on 10.9 (for real this time)
I did commit 86c05655d
by thinking `mpv` already removed the `mpv` from
argc/argv. It actually is still there, so the argc must be 1 to check for no
arguments.
Thanks to @Nyx0uf for pointing out the bug and for testing on 10.9!
This commit is contained in:
parent
fe7fed590a
commit
ddd3ade023
@ -429,7 +429,7 @@ static bool bundle_started_from_finder(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
bool bundle_detected = [[NSBundle mainBundle] bundleIdentifier];
|
bool bundle_detected = [[NSBundle mainBundle] bundleIdentifier];
|
||||||
bool pre_mavericks_args = argc==2 && psn_matches_current_process(argv[1]);
|
bool pre_mavericks_args = argc==2 && psn_matches_current_process(argv[1]);
|
||||||
bool post_mavericks_args = argc==0;
|
bool post_mavericks_args = argc==1;
|
||||||
|
|
||||||
return bundle_detected && (pre_mavericks_args || post_mavericks_args);
|
return bundle_detected && (pre_mavericks_args || post_mavericks_args);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user