From b8a431c892080bd74b7310341122dc2bd222f292 Mon Sep 17 00:00:00 2001 From: FRAU KOUJIRO Date: Tue, 15 Apr 2014 19:52:24 -0700 Subject: [PATCH] cocoa: macosx_application needs cocoa-application --- video/out/cocoa/window.m | 1 - video/out/cocoa_common.m | 9 +++++++-- wscript_build.py | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/video/out/cocoa/window.m b/video/out/cocoa/window.m index aca488cfc4..3dc937565b 100644 --- a/video/out/cocoa/window.m +++ b/video/out/cocoa/window.m @@ -19,7 +19,6 @@ #include "input/keycodes.h" -#include "osdep/macosx_application.h" #include "osdep/macosx_events.h" #include "osdep/macosx_compat.h" diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index 6837a062d4..a1ea157482 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -28,12 +28,15 @@ #import "video/out/cocoa/mpvadapter.h" #include "osdep/macosx_compat.h" -#include "osdep/macosx_application.h" -#include "osdep/macosx_application_objc.h" #include "osdep/macosx_events_objc.h" #include "config.h" +#if HAVE_COCOA_APPLICATION +# include "osdep/macosx_application.h" +# include "osdep/macosx_application_objc.h" +#endif + #include "options/options.h" #include "video/out/vo.h" #include "win_state.h" @@ -298,11 +301,13 @@ static void create_window(struct vo *vo, struct mp_rect *win, int geo_flags) [s->view setWantsBestResolutionOpenGLSurface:YES]; +#if HAVE_COCOA_APPLICATION cocoa_register_menu_item_action(MPM_H_SIZE, @selector(halfSize)); cocoa_register_menu_item_action(MPM_N_SIZE, @selector(normalSize)); cocoa_register_menu_item_action(MPM_D_SIZE, @selector(doubleSize)); cocoa_register_menu_item_action(MPM_MINIMIZE, @selector(performMiniaturize:)); cocoa_register_menu_item_action(MPM_ZOOM, @selector(performZoom:)); +#endif [s->window setRestorable:NO]; [s->window setContentView:s->view]; diff --git a/wscript_build.py b/wscript_build.py index a30af01aee..bfb847a319 100644 --- a/wscript_build.py +++ b/wscript_build.py @@ -382,7 +382,7 @@ def build(ctx): ( "osdep/threads.c" ), ( "osdep/ar/HIDRemote.m", "cocoa" ), - ( "osdep/macosx_application.m", "cocoa" ), + ( "osdep/macosx_application.m", "cocoa-application" ), ( "osdep/macosx_events.m", "cocoa" ), ( "osdep/path-macosx.m", "cocoa" ),