Commit 4630078e authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

macosx: Properly inherit variables if they don't exist.

parent 58893073
...@@ -1058,7 +1058,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -1058,7 +1058,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
[self makeFirstResponder: o_view]; [self makeFirstResponder: o_view];
[self setCanBecomeKeyWindow: YES]; [self setCanBecomeKeyWindow: YES];
if( var_GetBool( p_vout, "macosx-background" ) ) if( var_CreateGetBool( p_vout, "macosx-background" ) )
{ {
int i_device = var_GetInteger( p_vout->p_libvlc, "video-device" ); int i_device = var_GetInteger( p_vout->p_libvlc, "video-device" );
...@@ -1075,12 +1075,12 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -1075,12 +1075,12 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
[self setLevel: CGWindowLevelForKey(kCGDesktopWindowLevelKey)]; [self setLevel: CGWindowLevelForKey(kCGDesktopWindowLevelKey)];
[self setMovableByWindowBackground: NO]; [self setMovableByWindowBackground: NO];
} }
if( var_GetBool( p_vout, "video-on-top" ) ) if( var_CreateGetBool( p_vout, "video-on-top" ) )
{ {
[self setLevel: NSStatusWindowLevel]; [self setLevel: NSStatusWindowLevel];
} }
[self setAlphaValue: var_GetFloat( p_vout, "macosx-opaqueness" )]; [self setAlphaValue: var_CreateGetFloat( p_vout, "macosx-opaqueness" )];
/* Add the view. It's automatically resized to fit the window */ /* Add the view. It's automatically resized to fit the window */
[self setContentView: o_view]; [self setContentView: o_view];
...@@ -1099,7 +1099,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -1099,7 +1099,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
BOOL b_black = NO; BOOL b_black = NO;
i_device = var_GetInteger( p_vout->p_libvlc, "video-device" ); i_device = var_GetInteger( p_vout->p_libvlc, "video-device" );
b_black = var_GetBool( p_vout, "macosx-black" ); b_black = var_CreateGetBool( p_vout, "macosx-black" );
/* Find out on which screen to open the window */ /* Find out on which screen to open the window */
screen = [NSScreen screenWithDisplayID: (CGDirectDisplayID)i_device]; screen = [NSScreen screenWithDisplayID: (CGDirectDisplayID)i_device];
......
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