]> git.sesse.net Git - vlc/commitdiff
* store the value of 'macosx-black' as one of VLCWindow's properties to prevent rare...
authorFelix Paul Kühne <fkuehne@videolan.org>
Tue, 4 Apr 2006 20:33:54 +0000 (20:33 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Tue, 4 Apr 2006 20:33:54 +0000 (20:33 +0000)
When going to fast to fullscreen/windowed-mode VLC can still crash (now at vout.m:375), but that scenario isn't realistic because you need to perform this function at least 5 to 10 times per second to get this done.

modules/gui/macosx/vout.m

index f024382c60a3e370b4b82ea21313c766a086491d..8e13dce8c267cef0012f248b11beacb563969b9d 100644 (file)
@@ -937,6 +937,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
     p_fullscreen_state = NULL;
     p_real_vout = [VLCVoutView getRealVout: p_vout];
     i_device = var_GetInteger( p_real_vout->p_vlc, "video-device" );
+    b_black = var_GetBool( p_real_vout->p_vlc, "macosx-black" );
 
     /* Find out on which screen to open the window */
     if( i_device <= 0 || i_device > (int)[o_screens count] )
@@ -967,6 +968,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
               defer: YES screen: o_screen];
 
         if( var_GetBool( p_real_vout, "macosx-black" ) )
+        if( b_black == VLC_TRUE )
         {
             CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token);
             CGDisplayFade( token, 0.5, kCGDisplayBlendNormal, kCGDisplayBlendSolidColor, 0, 0, 0, true );
@@ -1008,7 +1010,8 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
             BeginFullScreen( &p_fullscreen_state, NULL, 0, 0,
                              NULL, NULL, fullScreenAllowEvents );
         }
-        if( var_GetBool( p_real_vout, "macosx-black" ) )
+        if( b_black == VLC_TRUE )
+        //if( var_GetBool( p_real_vout, "macosx-black" ) )
         {
             CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token);
             CGDisplayFade( token, 2 , kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, 0, 0, 0, false );
@@ -1097,7 +1100,8 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
 {
     if( p_fullscreen_state )
         EndFullScreen( p_fullscreen_state, 0 );
-    if( var_GetBool( p_vout, "macosx-black" ) )
+    if( b_black == VLC_TRUE )
+    //if( var_GetBool( p_vout, "macosx-black" ) )
     {
         CGDisplayFadeReservationToken token;
         CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token);