From b0f3b7ae485bd381ed6bcd33b09ac7cecbd23c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org> Date: Tue, 9 Aug 2011 16:19:11 +0200 Subject: [PATCH] macosx: fixed compilation warnings --- modules/gui/macosx/applescript.m | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/modules/gui/macosx/applescript.m b/modules/gui/macosx/applescript.m index 93e0d45a018e..ca849f85bad3 100644 --- a/modules/gui/macosx/applescript.m +++ b/modules/gui/macosx/applescript.m @@ -136,11 +136,23 @@ @implementation NSApplication(ScriptSupport) - (BOOL) scriptFullscreenMode { - return [[[VLCMain sharedInstance] controls] isFullscreen]; + vout_thread_t * p_vout = getVout(); + if( !p_vout ) + return NO; + BOOL b_value = var_GetBool( p_vout, "fullscreen"); + vlc_object_release( p_vout ); + return b_value; } - (void) setScriptFullscreenMode: (BOOL) mode { - VLCControls * o_controls = [[VLCMain sharedInstance] controls]; - if (mode == [o_controls isFullscreen]) return; + vout_thread_t * p_vout = getVout(); + if( !p_vout ) + return; + if (var_GetBool( p_vout, "fullscreen") == mode) + { + vlc_object_release( p_vout ); + return; + } + vlc_object_release( p_vout ); [[VLCCoreInteraction sharedInstance] toggleFullscreen]; } -- GitLab