}
else
{
- msg_Warn( VLCIntf, "Cannot find Video Output");
+ msg_Warn( VLCIntf, "cannot find Video Output");
}
}
- (BOOL)windowContainsEmbedded: (id)o_window
{
- if( ![[o_window className] isEqualToString: @"VLCWindow"] )
+/* if( ![[o_window className] isEqualToString: @"VLCWindow"] )
{
NSLog( @"We were not given a VLCWindow" );
- }
+ }*/
return ([self getViewForWindow: o_window] == nil ? NO : YES );
}
b_init_ok = VLC_FALSE;
p_fullscreen_state = NULL;
- b_fullscreen = VLC_FALSE;
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] )
if( p_vout->b_fullscreen )
{
CGDisplayFadeReservationToken token;
- b_fullscreen = VLC_TRUE;
NSRect screen_rect = [o_screen frame];
screen_rect.origin.x = screen_rect.origin.y = 0;
backing: NSBackingStoreBuffered
defer: YES screen: o_screen];
- if( var_GetBool( p_vout, "macosx-black" ) )
+ 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 );
CGReleaseDisplayFadeReservation( token );
- int i;
+ unsigned int i;
for( i = 0 ; i < [o_screens count]; i++)
{
struct
CGDisplayCount dspyCnt;
CGPoint gPoint;
- if( i == i_device ) continue;
+ if( i == (unsigned int)i_device ) continue;
screen_rect = [[o_screens objectAtIndex: i] frame];
BeginFullScreen( &p_fullscreen_state, NULL, 0, 0,
NULL, NULL, fullScreenAllowEvents );
}
- if( var_GetBool( p_vout, "macosx-black" ) )
+ if( b_black == VLC_TRUE )
{
CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token);
- CGDisplayFade( token, 2, kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, 0, 0, 0, false );
+ CGDisplayFade( token, 2 , kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, 0, 0, 0, false );
CGReleaseDisplayFadeReservation( token);
}
}
- (id) closeReal: (id) sender
{
- if( b_fullscreen == VLC_TRUE )
+ if( p_fullscreen_state )
+ EndFullScreen( p_fullscreen_state, 0 );
+ if( b_black == VLC_TRUE )
{
- if( p_vout->b_fullscreen )
- EndFullScreen( p_fullscreen_state, 0 );
- if( var_GetBool( p_vout, "macosx-black" ) )
- {
- CGDisplayFadeReservationToken token;
- CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token);
- CGDisplayFade( token, 2, kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, 0, 0, 0, false );
- CGReleaseDisplayFadeReservation( token);
- CGDisplayRestoreColorSyncSettings();
- }
+ CGDisplayFadeReservationToken token;
+ CGAcquireDisplayFadeReservation(kCGMaxDisplayReservationInterval, &token);
+ CGDisplayFade( token, 2, kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, 0, 0, 0, false );
+ CGReleaseDisplayFadeReservation( token);
+ CGDisplayRestoreColorSyncSettings();
}
[super close];
return NULL;