[Mplayer-cvslog] CVS: main/libvo vo_sdl.c,1.67,1.68

Atmosfear atmos4 at mplayer.dev.hu
Wed Feb 20 23:42:49 CET 2002


Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv22049/libvo

Modified Files:
	vo_sdl.c 
Log Message:
 support for VOCTRL_FULLSCREEN

Index: vo_sdl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_sdl.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- vo_sdl.c	9 Feb 2002 01:21:48 -0000	1.67
+++ vo_sdl.c	20 Feb 2002 22:42:46 -0000	1.68
@@ -1129,20 +1129,6 @@
 					if(verbose > 1) printf("SDL: Set next available fullscreen mode.\n");
 				}
 
-				/* 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);
-						SDL_ShowCursor(1);
-						if(verbose > 1) printf("SDL: Windowed mode\n");
-					} 
-					else if (priv->fullmodes){
-						set_fullmode(priv->fullmode);
-
-						if(verbose > 1) printf("SDL: Set fullscreen mode\n");
-					}
-				}
-
 				else if ( keypressed == SDLK_n ) {
 #ifdef HAVE_X11					
 					aspect(&priv->dstwidth, &priv->dstheight,A_NOZOOM);
@@ -1328,9 +1314,21 @@
 
 static uint32_t control(uint32_t request, void *data, ...)
 {
+  struct sdl_priv_s *priv = &sdl_priv;
   switch (request) {
   case VOCTRL_QUERY_FORMAT:
     return query_format(*((uint32_t*)data));
+  case VOCTRL_FULLSCREEN:
+    if (priv->surface->flags & SDL_FULLSCREEN) {
+      priv->surface = SDL_SetVideoMode(priv->windowsize.w, priv->windowsize.h, priv->bpp, priv->sdlflags);
+      SDL_ShowCursor(1);
+      if(verbose > 1) printf("SDL: Windowed mode\n");
+    } else if (priv->fullmodes) {
+      set_fullmode(priv->fullmode);
+      if(verbose > 1) printf("SDL: Set fullscreen mode\n");
+    }
+    //return VO_TRUE; // XXX what should VOCTRL_FULLSCREEN return?
   }
+
   return VO_NOTIMPL;
 }




More information about the MPlayer-cvslog mailing list