From 19a5b20752ecc7465cf17781f908e12bf4ca136d Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 2 May 2015 18:09:01 +0200 Subject: cocoa: always compile OSX application code with cocoa This unbreaks compiling command line player and libmpv at the same time. The problem was that doing so silently disabled the OSX application thing - but the command line player can not use the vo_opengl Cocoa backend without it. The OSX application code is basically dead in libmpv, but it's not that much code anyway. If you want a mpv binary that does not create an OSX application singleton (and creates a menu etc.), you must disable cocoa completely, as cocoa can't be used anyway in this case. --- video/out/cocoa_common.m | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'video') diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index 8a0473e729..e9c33d6f60 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -35,10 +35,8 @@ #include "config.h" -#if HAVE_COCOA_APPLICATION -# include "osdep/macosx_application.h" -# include "osdep/macosx_application_objc.h" -#endif +#include "osdep/macosx_application.h" +#include "osdep/macosx_application_objc.h" #include "options/options.h" #include "video/out/vo.h" @@ -462,13 +460,11 @@ static void create_ui(struct vo *vo, struct mp_rect *win, int geo_flags) [view signalMousePosition]; s->adapter = adapter; -#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->video = [[MpvVideoView alloc] initWithFrame:[s->view bounds]]; [s->video setWantsBestResolutionOpenGLSurface:YES]; -- cgit v1.2.3