[Mplayer-cvslog] CVS: main/libvo vo_sdl.c,1.5,1.6
Felix Buenemann
atmosfear at users.sourceforge.net
Tue Apr 10 23:41:33 CEST 2001
Update of /cvsroot/mplayer/main/libvo
In directory usw-pr-cvs1:/tmp/cvs-serv3441
Modified Files:
vo_sdl.c
Log Message:
- Changed keypress-detection from keydown to keyup, seems to fix keyrepeat
bug (key had to be pressed twice to be detected)
- Changed key-handling: 'f' cycles fullscreen/windowed, ESC/RETURN/'q' quits
- Bugfix which avoids exit, because return is passed to sdl-output on startup,
which caused the player to exit (keyboard-buffer problem? better solution
recommed)
Index: vo_sdl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_sdl.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** vo_sdl.c 2001/04/01 00:08:26 1.5
--- vo_sdl.c 2001/04/10 21:41:31 1.6
***************
*** 51,54 ****
--- 51,61 ----
* - Bugfix to check_events() to reveal mouse cursor after 'q'-quit in
* fullscreen-mode
+ * Felix Buenemann <Atmosfear at users.sourceforge.net> - March 12, 2001
+ * - Changed keypress-detection from keydown to keyup, seems to fix keyrepeat
+ * bug (key had to be pressed twice to be detected)
+ * - Changed key-handling: 'f' cycles fullscreen/windowed, ESC/RETURN/'q' quits
+ * - Bugfix which avoids exit, because return is passed to sdl-output on startup,
+ * which caused the player to exit (keyboard-buffer problem? better solution
+ * recommed)
*/
***************
*** 136,140 ****
* returns : 0 on success, -1 on failure
**/
!
static int sdl_open (void *plugin, void *name)
{
--- 143,147 ----
* returns : 0 on success, -1 on failure
**/
!
static int sdl_open (void *plugin, void *name)
{
***************
*** 142,146 ****
const SDL_VideoInfo *vidInfo = NULL;
static int opened = 0;
!
if (opened)
return 0;
--- 149,153 ----
const SDL_VideoInfo *vidInfo = NULL;
static int opened = 0;
!
if (opened)
return 0;
***************
*** 210,214 ****
/* We dont want those in out event queue */
SDL_EventState(SDL_ACTIVEEVENT, SDL_IGNORE);
! SDL_EventState(SDL_KEYUP, SDL_IGNORE);
SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE);
SDL_EventState(SDL_MOUSEBUTTONDOWN, SDL_IGNORE);
--- 217,222 ----
/* We dont want those in out event queue */
SDL_EventState(SDL_ACTIVEEVENT, SDL_IGNORE);
! //SDL_EventState(SDL_KEYUP, SDL_IGNORE);
! SDL_EventState(SDL_KEYDOWN, SDL_IGNORE);
SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE);
SDL_EventState(SDL_MOUSEBUTTONDOWN, SDL_IGNORE);
***************
*** 474,478 ****
struct sdl_priv_s *priv = &sdl_priv;
SDL_Event event;
! SDLKey keypressed;
/* Poll the waiting SDL Events */
--- 482,487 ----
struct sdl_priv_s *priv = &sdl_priv;
SDL_Event event;
! SDLKey keypressed = 0;
! static int firstcheck = 0;
/* Poll the waiting SDL Events */
***************
*** 494,498 ****
/* graphics mode selection shortcuts */
! case SDL_KEYDOWN:
keypressed = event.key.keysym.sym;
--- 503,507 ----
/* graphics mode selection shortcuts */
! case SDL_KEYUP:
keypressed = event.key.keysym.sym;
***************
*** 507,512 ****
}
! /* return or escape key pressed toggles/exits fullscreenmode */
! else if ( (keypressed == SDLK_RETURN) || (keypressed == SDLK_ESCAPE) ) {
if (priv->surface->flags & SDL_FULLSCREEN) {
priv->surface = SDL_SetVideoMode(priv->windowsize.w, priv->windowsize.h, priv->bpp, priv->sdlflags);
--- 516,521 ----
}
! /* f key pressed toggles/exits fullscreenmode */
! else if ( keypressed == SDLK_f ) {
if (priv->surface->flags & SDL_FULLSCREEN) {
priv->surface = SDL_SetVideoMode(priv->windowsize.w, priv->windowsize.h, priv->bpp, priv->sdlflags);
***************
*** 523,527 ****
else switch(keypressed){
// case SDLK_q: if(!(priv->surface->flags & SDL_FULLSCREEN))mplayer_put_key('q');break;
! case SDLK_q: SDL_ShowCursor(1); mplayer_put_key('q');break; //F.B.: added ShowCursor
case SDLK_p: mplayer_put_key('p');break;
case SDLK_SPACE: mplayer_put_key(' ');break;
--- 532,542 ----
else switch(keypressed){
// case SDLK_q: if(!(priv->surface->flags & SDL_FULLSCREEN))mplayer_put_key('q');break;
! case SDLK_RETURN:
! if (!firstcheck) { firstcheck = 1; break; }
! case SDLK_ESCAPE:
! case SDLK_q:
! SDL_ShowCursor(1);
! mplayer_put_key('q');
! break;
case SDLK_p: mplayer_put_key('p');break;
case SDLK_SPACE: mplayer_put_key(' ');break;
_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog
More information about the MPlayer-cvslog
mailing list