diff options
Diffstat (limited to 'osdep/macosx_application.m')
-rw-r--r-- | osdep/macosx_application.m | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/osdep/macosx_application.m b/osdep/macosx_application.m index 2ff3386f76..595c47e3c6 100644 --- a/osdep/macosx_application.m +++ b/osdep/macosx_application.m @@ -26,6 +26,7 @@ #include "osdep/macosx_compat.h" #import "osdep/macosx_events_objc.h" #include "osdep/threads.h" +#include "osdep/main-fn.h" #define MPV_PROTOCOL @"mpv://" @@ -252,7 +253,6 @@ static void terminate_cocoa_application(void) @end struct playback_thread_ctx { - mpv_main_fn mpv_main; int *argc; char ***argv; }; @@ -269,7 +269,7 @@ static void *playback_thread(void *ctx_obj) mpthread_set_name("playback core (OSX)"); @autoreleasepool { struct playback_thread_ctx *ctx = (struct playback_thread_ctx*) ctx_obj; - int r = ctx->mpv_main(*ctx->argc, *ctx->argv); + int r = mpv_main(*ctx->argc, *ctx->argv); terminate_cocoa_application(); // normally never reached - unless the cocoa mainloop hasn't started yet exit(r); @@ -361,13 +361,12 @@ static bool bundle_started_from_finder(int argc, char **argv) } } -int cocoa_main(mpv_main_fn mpv_main, int argc, char *argv[]) +int cocoa_main(int argc, char *argv[]) { @autoreleasepool { application_instantiated = true; struct playback_thread_ctx ctx = {0}; - ctx.mpv_main = mpv_main; ctx.argc = &argc; ctx.argv = &argv; |