Commit 653a9c2c authored by Stéphane Borel's avatar Stéphane Borel

. Fixed the sdl plugins to match the changes in the version 1.1.5

The vlc gives a segfault when exiting if you use sdl. I still don't know why
parent 98484c4b
......@@ -179,6 +179,8 @@ void intf_SDLManage( intf_thread_t *p_intf )
void intf_SDL_Fullscreen(intf_thread_t * p_intf)
{
SDL_Rect clipping_rect;
SDL_FreeSurface( p_intf->p_vout->p_sys->p_display );
if(p_intf->p_sys->b_Fullscreen == 0)
......@@ -213,9 +215,13 @@ void intf_SDL_Fullscreen(intf_thread_t * p_intf)
p_intf->p_vout->p_sys->p_buffer[ 1 ] = p_intf->p_vout->p_sys->p_display->pixels;
SDL_Flip(p_intf->p_vout->p_sys->p_display);
SDL_SetClipping(p_intf->p_vout->p_sys->p_display, 0, 0,
p_intf->p_vout->p_sys->p_display->w,
p_intf->p_vout->p_sys->p_display->h );
/* Clipping zone for the text */
clipping_rect.x = 0;
clipping_rect.y = 0;
clipping_rect.w = p_intf->p_vout->p_sys->p_display->w;
clipping_rect.h = p_intf->p_vout->p_sys->p_display->h;
SDL_SetClipRect(p_intf->p_vout->p_sys->p_display, &clipping_rect);
p_intf->p_vout->i_width = p_intf->p_vout->p_sys->p_display->w;
p_intf->p_vout->i_height = p_intf->p_vout->p_sys->p_display->h;
......
......@@ -196,6 +196,8 @@ void vout_SDLDisplay( vout_thread_t *p_vout )
*****************************************************************************/
static int SDLOpenDisplay( vout_thread_t *p_vout, char *psz_display, void *p_data )
{
SDL_Rect clipping_rect;
/* Initialize library */
if( SDL_Init(SDL_INIT_VIDEO) < 0 )
{
......@@ -256,9 +258,11 @@ static int SDLOpenDisplay( vout_thread_t *p_vout, char *psz_display, void *p_dat
*/
/* Set clipping for text */
SDL_SetClipping(p_vout->p_sys->p_display, 0, 0,
p_vout->p_sys->p_display->w,
p_vout->p_sys->p_display->h );
clipping_rect.x = 0;
clipping_rect.y = 0;
clipping_rect.w = p_vout->p_sys->p_display->w;
clipping_rect.h = p_vout->p_sys->p_display->h;
SDL_SetClipRect(p_vout->p_sys->p_display, &clipping_rect);
......
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