Commit 8b1a79bb authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

Fix MacOS X black screens and play as background options. These are 'window...

Fix MacOS X black screens and play as background options. These are 'window level' options and as such should not use p_real_vout, because that's just for options shared by the opengl and the quickdraw renderer
parent a324ed1b
...@@ -699,7 +699,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -699,7 +699,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
else else
{ {
if ( VLCIntf && !(p_vout->b_fullscreen) && if ( VLCIntf && !(p_vout->b_fullscreen) &&
!(var_GetBool( p_real_vout, "macosx-background" )) && !(var_GetBool( p_vout, "macosx-background" )) &&
var_GetBool( p_vout, "macosx-embedded") ) var_GetBool( p_vout, "macosx-embedded") )
{ {
o_return = [[[VLCMain sharedInstance] getEmbeddedList] o_return = [[[VLCMain sharedInstance] getEmbeddedList]
...@@ -921,7 +921,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -921,7 +921,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
p_real_vout = [VLCVoutView getRealVout: p_vout]; p_real_vout = [VLCVoutView getRealVout: p_vout];
i_device = var_GetInteger( p_real_vout->p_libvlc, "video-device" ); i_device = var_GetInteger( p_real_vout->p_libvlc, "video-device" );
b_black = var_GetBool( p_real_vout->p_libvlc, "macosx-black" ); b_black = var_GetBool( p_vout, "macosx-black" );
/* Find out on which screen to open the window */ /* Find out on which screen to open the window */
if( i_device <= 0 || i_device > (int)[o_screens count] ) if( i_device <= 0 || i_device > (int)[o_screens count] )
...@@ -951,7 +951,6 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -951,7 +951,6 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
backing: NSBackingStoreBuffered backing: NSBackingStoreBuffered
defer: YES screen: o_screen]; defer: YES screen: o_screen];
if( var_GetBool( p_real_vout, "macosx-black" ) )
if( b_black == VLC_TRUE ) if( b_black == VLC_TRUE )
{ {
CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token); CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token);
...@@ -1000,7 +999,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -1000,7 +999,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
CGReleaseDisplayFadeReservation( token); CGReleaseDisplayFadeReservation( token);
} }
} }
else if( var_GetBool( p_real_vout, "macosx-background" ) ) else if( var_GetBool( p_vout, "macosx-background" ) )
{ {
NSRect screen_rect = [o_screen frame]; NSRect screen_rect = [o_screen frame];
screen_rect.origin.x = screen_rect.origin.y = 0; screen_rect.origin.x = screen_rect.origin.y = 0;
......
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