1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-18 04:45:33 +00:00
mpv/osdep/main-fn-mac.c
der richter 3c51497954 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
2024-04-01 22:13:39 +02:00

8 lines
208 B
C

#include "osdep/mac/app_bridge.h"
// 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);
}