diff options
author | der richter <der.richter@gmx.de> | 2024-04-01 01:00:19 +0200 |
---|---|---|
committer | der richter <der.richter@gmx.de> | 2024-04-01 22:13:39 +0200 |
commit | 3c5149795480a15bf00c1a14045294f389e37af5 (patch) | |
tree | 167e5ab3c245911a076159c108748912b55337e3 /osdep/main-fn-mac.c | |
parent | d6c621b03beef1a38e66b33507a13e329e753383 (diff) | |
download | mpv-3c5149795480a15bf00c1a14045294f389e37af5.tar.bz2 mpv-3c5149795480a15bf00c1a14045294f389e37af5.tar.xz |
mac/app: cleanup and optimise App launch and termination
NSApp.terminate() is not a requirement to properly shut down a cocoa
App since it only calls exit() internally. though when not used the
cocoa termination events won't trigger, which we don't need. this
prevented us to exit with a proper exit code.
rework the whole termination logic to end up at one point where we can
return the exit code from the mpv_main function.
Fixes #7456
Diffstat (limited to 'osdep/main-fn-mac.c')
-rw-r--r-- | osdep/main-fn-mac.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/osdep/main-fn-mac.c b/osdep/main-fn-mac.c index ee2d6e3464..140610093f 100644 --- a/osdep/main-fn-mac.c +++ b/osdep/main-fn-mac.c @@ -1,9 +1,6 @@ #include "osdep/mac/app_bridge.h" -// This is needed because Cocoa absolutely requires creating the NSApplication -// singleton and running it in the "main" thread. It is apparently not -// possible to do this on a separate thread at all. It is not known how -// Apple managed this colossal fuckup. +// Cocoa absolutely requires creating the NSApplication singleton and running it on the main thread. int main(int argc, char *argv[]) { return cocoa_main(argc, argv); |