sdl plugin :

  - Quantic start in fullscreen fixed.
parent 90820464
...@@ -85,6 +85,7 @@ int vout_SDLCreate( vout_thread_t *p_vout, char *psz_display, ...@@ -85,6 +85,7 @@ int vout_SDLCreate( vout_thread_t *p_vout, char *psz_display,
p_vout->p_sys->p_display = NULL; p_vout->p_sys->p_display = NULL;
p_vout->p_sys->p_overlay = NULL; p_vout->p_sys->p_overlay = NULL;
p_vout->p_sys->b_must_acquire = 0;
/* Initialize library */ /* Initialize library */
if( SDL_Init(SDL_INIT_VIDEO) < 0 ) if( SDL_Init(SDL_INIT_VIDEO) < 0 )
...@@ -95,14 +96,6 @@ int vout_SDLCreate( vout_thread_t *p_vout, char *psz_display, ...@@ -95,14 +96,6 @@ int vout_SDLCreate( vout_thread_t *p_vout, char *psz_display,
return( 1 ); return( 1 );
} }
if( SDLOpenDisplay(p_vout) )
{
intf_ErrMsg( "error: can't initialize SDL library: %s\n",
SDL_GetError() );
free( p_vout->p_sys );
return( 1 );
}
/* Force the software yuv even if it is not used */ /* Force the software yuv even if it is not used */
/* If we don't do this, p_vout is not correctly initialized /* If we don't do this, p_vout is not correctly initialized
and it's impossible to switch between soft/hard yuv */ and it's impossible to switch between soft/hard yuv */
...@@ -111,13 +104,24 @@ int vout_SDLCreate( vout_thread_t *p_vout, char *psz_display, ...@@ -111,13 +104,24 @@ int vout_SDLCreate( vout_thread_t *p_vout, char *psz_display,
if(psz_display != NULL && strcmp(psz_display,"fullscreen")==0) if(psz_display != NULL && strcmp(psz_display,"fullscreen")==0)
{ {
p_vout->p_sys->b_fullscreen = 1; p_vout->p_sys->b_fullscreen = 1;
} else { }
else
{
p_vout->p_sys->b_fullscreen = 0; p_vout->p_sys->b_fullscreen = 0;
} }
p_vout->p_sys->b_reopen_display = 1; p_vout->p_sys->b_reopen_display = 1;
if( SDLOpenDisplay(p_vout) )
{
intf_ErrMsg( "error: can't initialize SDL library: %s\n",
SDL_GetError() );
free( p_vout->p_sys );
return( 1 );
}
return( 0 ); return( 0 );
} }
/***************************************************************************** /*****************************************************************************
* vout_SDLInit: initialize SDL video thread output method * vout_SDLInit: initialize SDL video thread output method
...@@ -301,7 +305,7 @@ static int SDLOpenDisplay( vout_thread_t *p_vout ) ...@@ -301,7 +305,7 @@ static int SDLOpenDisplay( vout_thread_t *p_vout )
intf_ErrMsg( "error: can't open DISPLAY default display\n" ); intf_ErrMsg( "error: can't open DISPLAY default display\n" );
return( 1 ); return( 1 );
} }
p_vout->p_sys->p_overlay = NULL; SDL_LockSurface(p_vout->p_sys->p_display);
SDL_WM_SetCaption( VOUT_TITLE , VOUT_TITLE ); SDL_WM_SetCaption( VOUT_TITLE , VOUT_TITLE );
SDL_EventState(SDL_KEYUP , SDL_IGNORE); /* ignore keys up */ SDL_EventState(SDL_KEYUP , SDL_IGNORE); /* ignore keys up */
......
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