X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fmacosx%2Fvoutgl.m;h=4a542e6bc742827fe6d1dc320293e73da746d7d4;hb=87b363cfd843795675f5919e0d9d25c97c045753;hp=7f88fe2b34ae0d012ab6672ed296b5fb8179e28e;hpb=272817e4e8be36e209ea64e5de1784f951bc8ebb;p=vlc diff --git a/modules/gui/macosx/voutgl.m b/modules/gui/macosx/voutgl.m index 7f88fe2b34..4a542e6bc7 100644 --- a/modules/gui/macosx/voutgl.m +++ b/modules/gui/macosx/voutgl.m @@ -103,7 +103,6 @@ static void aglUnlock ( vout_thread_t * p_vout ); int OpenVideoGL ( vlc_object_t * p_this ) { vout_thread_t * p_vout = (vout_thread_t *) p_this; - vlc_value_t value_drawable; if( !CGDisplayUsesOpenGLAcceleration( kCGDirectMainDisplay ) ) { @@ -119,8 +118,9 @@ int OpenVideoGL ( vlc_object_t * p_this ) memset( p_vout->p_sys, 0, sizeof( vout_sys_t ) ); #ifndef __x86_64__ - var_Get( p_vout->p_libvlc, "drawable-agl", &value_drawable ); - if( value_drawable.i_int != 0 ) + int i_drawable_agl; + i_drawable_agl = var_GetInteger( p_vout->p_libvlc, "drawable-agl" ); + if( i_drawable_agl > 0 ) { static const GLint ATTRIBUTES[] = { AGL_WINDOW, @@ -208,41 +208,26 @@ void CloseVideoGL ( vlc_object_t * p_this ) { vout_thread_t * p_vout = (vout_thread_t *) p_this; - msg_Dbg( p_this, "Closing" ); #ifndef __x86_64__ - /* If the fullscreen window is still open, close it */ - if( p_vout->b_fullscreen ) + if( p_vout->p_sys->b_embedded ) { - p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE; - if( p_vout->p_sys->b_embedded ) + /* If the fullscreen window is still open, close it */ + if( p_vout->b_fullscreen ) { + p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE; aglManage( p_vout ); var_SetBool( p_vout->p_parent, "fullscreen", false ); } - else - Manage( p_vout ); - } - - if( p_vout->p_sys->b_embedded ) - { if( p_vout->p_sys->agl_ctx ) { aglEnd( p_vout ); aglDestroyContext(p_vout->p_sys->agl_ctx); } } - else if(VLCIntf && vlc_object_alive (VLCIntf)) - { - NSAutoreleasePool *o_pool = [[NSAutoreleasePool alloc] init]; - - /* Close the window */ - [p_vout->p_sys->o_vout_view performSelectorOnMainThread:@selector(closeVout) withObject:NULL waitUntilDone:YES]; - - [o_pool release]; - } -#else - if(VLCIntf && vlc_object_alive (VLCIntf)) + else +#endif + if(VLCIntf && vlc_object_alive (VLCIntf)) { NSAutoreleasePool *o_pool = [[NSAutoreleasePool alloc] init]; @@ -251,7 +236,6 @@ void CloseVideoGL ( vlc_object_t * p_this ) [o_pool release]; } -#endif /* Clean up */ free( p_vout->p_sys ); }