Commit 72b44bd5 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

macosx: Save a reference to the view in the voutgl.

parent 9667973b
...@@ -145,7 +145,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -145,7 +145,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
- (id)initWithFrame: (NSRect)frameRect - (id)initWithFrame: (NSRect)frameRect
{ {
[super initWithFrame: frameRect]; self = [super initWithFrame: frameRect];
p_vout = NULL; p_vout = NULL;
o_view = nil; o_view = nil;
s_frame = &frameRect; s_frame = &frameRect;
......
...@@ -260,6 +260,7 @@ static int Manage( vout_thread_t * p_vout ) ...@@ -260,6 +260,7 @@ static int Manage( vout_thread_t * p_vout )
p_vout->i_changes &= ~VOUT_FULLSCREEN_CHANGE; p_vout->i_changes &= ~VOUT_FULLSCREEN_CHANGE;
} }
if( p_vout->p_sys->o_vout_view )
[p_vout->p_sys->o_vout_view manage]; [p_vout->p_sys->o_vout_view manage];
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -319,8 +320,10 @@ static void Unlock( vout_thread_t * p_vout ) ...@@ -319,8 +320,10 @@ static void Unlock( vout_thread_t * p_vout )
[p_vout->p_sys->o_glview autorelease]; [p_vout->p_sys->o_glview autorelease];
/* Spawn the window */ /* Spawn the window */
p_vout->p_sys->o_vout_view = [VLCVoutView getVoutView: p_vout id old_vout = p_vout->p_sys->o_vout_view;
subView: p_vout->p_sys->o_glview frame: nil]; p_vout->p_sys->o_vout_view = [[VLCVoutView getVoutView: p_vout
subView: p_vout->p_sys->o_glview frame: nil] retain];
[old_vout release];
} }
/* This function will reset the o_vout_view. It's useful to go fullscreen. */ /* This function will reset the o_vout_view. It's useful to go fullscreen. */
...@@ -345,15 +348,18 @@ static void Unlock( vout_thread_t * p_vout ) ...@@ -345,15 +348,18 @@ static void Unlock( vout_thread_t * p_vout )
if( p_vout->p_sys->b_saved_frame ) if( p_vout->p_sys->b_saved_frame )
{ {
p_vout->p_sys->o_vout_view = [VLCVoutView getVoutView: p_vout id old_vout = p_vout->p_sys->o_vout_view;
p_vout->p_sys->o_vout_view = [[VLCVoutView getVoutView: p_vout
subView: o_glview subView: o_glview
frame: &p_vout->p_sys->s_frame]; frame: &p_vout->p_sys->s_frame] retain];
[old_vout release];
} }
else else
{ {
p_vout->p_sys->o_vout_view = [VLCVoutView getVoutView: p_vout id old_vout = p_vout->p_sys->o_vout_view;
subView: o_glview frame: nil]; p_vout->p_sys->o_vout_view = [[VLCVoutView getVoutView: p_vout
subView: o_glview frame: nil] retain];
[old_vout release];
} }
#undef o_glview #undef o_glview
} }
......
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