.Added window title in sdl output
authorStéphane Borel <stef@videolan.org>
Sun, 29 Oct 2000 00:07:59 +0000 (00:07 +0000)
committerStéphane Borel <stef@videolan.org>
Sun, 29 Oct 2000 00:07:59 +0000 (00:07 +0000)
.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.

plugins/sdl/intf_sdl.c
plugins/sdl/vout_sdl.c

index 8d26123..aaaeb6e 100644 (file)
@@ -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);
 
 }
index b072555..6ad7dcf 100644 (file)
@@ -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, 
-            SDL_ANYFORMAT | SDL_HWSURFACE | SDL_DOUBLEBUF );
+            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 */