mirror of https://github.com/mpv-player/mpv
osx: move cocoa specific call out of common code
This is almost equivalent, and gets rid of the ifdef.
This commit is contained in:
parent
e920a00eba
commit
b8de478f51
|
@ -274,6 +274,8 @@ static void *playback_thread(void *ctx_obj)
|
|||
@autoreleasepool {
|
||||
struct playback_thread_ctx *ctx = (struct playback_thread_ctx*) ctx_obj;
|
||||
ctx->mpv_main(*ctx->argc, *ctx->argv);
|
||||
terminate_cocoa_application();
|
||||
// normally never reached
|
||||
cocoa_stop_runloop();
|
||||
pthread_exit(NULL);
|
||||
}
|
||||
|
|
|
@ -71,9 +71,6 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if HAVE_COCOA_APPLICATION
|
||||
#include "osdep/macosx_application.h"
|
||||
#endif
|
||||
#if HAVE_COCOA
|
||||
#include "osdep/macosx_events.h"
|
||||
#endif
|
||||
|
@ -227,11 +224,6 @@ static int prepare_exit_cplayer(struct MPContext *mpctx, enum exit_reason how)
|
|||
rc = mpctx->quit_custom_rc;
|
||||
|
||||
mp_destroy(mpctx);
|
||||
|
||||
#if HAVE_COCOA_APPLICATION
|
||||
// Note: this function never returns due to Cocoa calling exit(0)
|
||||
terminate_cocoa_application();
|
||||
#endif
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue