Commit aa1be1aa authored by Stéphane Borel's avatar Stéphane Borel

.Added window title in sdl output

.Removed mouse cursor in fullscreen mode
.Changed bits-per-pixel during window creation to X11 current depth

Although bits-per-pixel was initialized to 15 in every cases, the quality
changed when we switched X11 depth; so I don't know the real effect of this
constant in SDL.
parent 9d8d50a8
......@@ -189,11 +189,12 @@ void intf_SDL_Fullscreen(intf_thread_t * p_intf)
SDL_SetVideoMode(
p_intf->p_vout->i_width,
p_intf->p_vout->i_height,
15,
0,
SDL_ANYFORMAT |
SDL_HWSURFACE |
SDL_DOUBLEBUF);
p_intf->p_sys->b_Fullscreen = 1;
SDL_ShowCursor( 1 );
}
else
{
......@@ -201,13 +202,15 @@ void intf_SDL_Fullscreen(intf_thread_t * p_intf)
SDL_SetVideoMode(
p_intf->p_vout->i_width,
p_intf->p_vout->i_height,
15,
0,
SDL_ANYFORMAT |
SDL_HWSURFACE |
SDL_DOUBLEBUF |
SDL_FULLSCREEN );
p_intf->p_sys->b_Fullscreen = 0;
SDL_ShowCursor( 0 );
}
SDL_WM_SetCaption( VOUT_TITLE , VOUT_TITLE );
SDL_EventState(SDL_KEYUP , SDL_IGNORE);
p_intf->p_vout->p_sys->p_buffer[ 0 ] = p_intf->p_vout->p_sys->p_display->pixels;
......@@ -270,7 +273,7 @@ void intf_SDL_Keymap(intf_thread_t * p_intf )
/* intf_AssignKey(p_intf,'G','G'); */
intf_AssignKey(p_intf, SDLK_c, INTF_KEY_TOGGLE_GRAYSCALE, 0);
intf_AssignKey(p_intf, SDLK_SPACE, INTF_KEY_TOGGLE_INTERFACE, 0);
intf_AssignKey(p_intf, 'i', INTF_KEY_TOGGLE_INFO, 0);
intf_AssignKey(p_intf, SDLK_i, INTF_KEY_TOGGLE_INFO, 0);
intf_AssignKey(p_intf, SDLK_s, INTF_KEY_TOGGLE_SCALING, 0);
}
......
......@@ -211,14 +211,15 @@ static int SDLOpenDisplay( vout_thread_t *p_vout, char *psz_display, void *p_dat
{
p_vout->p_sys->p_display = SDL_SetVideoMode(p_vout->i_width,
p_vout->i_height,
15,
0,
SDL_ANYFORMAT | SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_FULLSCREEN );
SDL_ShowCursor( 0 );
} else {
p_vout->p_sys->p_display = SDL_SetVideoMode(p_vout->i_width,
p_vout->i_height,
15,
0,
SDL_ANYFORMAT | SDL_HWSURFACE | SDL_DOUBLEBUF );
SDL_ShowCursor( 1 );
}
if( p_vout->p_sys->p_display == NULL )
......@@ -226,6 +227,7 @@ static int SDLOpenDisplay( vout_thread_t *p_vout, char *psz_display, void *p_dat
intf_ErrMsg( "error: can't open DISPLAY default display\n" );
return( 1 );
}
SDL_WM_SetCaption( VOUT_TITLE , VOUT_TITLE );
SDL_EventState(SDL_KEYUP , SDL_IGNORE); /* ignore keys up */
/* Check buffers properties */
......
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