Commit b0f3b7ae authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fixed compilation warnings

parent ef215ef4
...@@ -136,11 +136,23 @@ ...@@ -136,11 +136,23 @@
@implementation NSApplication(ScriptSupport) @implementation NSApplication(ScriptSupport)
- (BOOL) scriptFullscreenMode { - (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 { - (void) setScriptFullscreenMode: (BOOL) mode {
VLCControls * o_controls = [[VLCMain sharedInstance] controls]; vout_thread_t * p_vout = getVout();
if (mode == [o_controls isFullscreen]) return; 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]; [[VLCCoreInteraction sharedInstance] toggleFullscreen];
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment