[MPlayer-cvslog] r31067 - in trunk: configure libvo/vo_sdl.c

reimar subversion at mplayerhq.hu
Sat Apr 24 19:15:28 CEST 2010


Author: reimar
Date: Sat Apr 24 19:15:28 2010
New Revision: 31067

Log:
Remove code to work around bugs in ancient libSDL versions, the code has been
accidentally disabled since some time and there were no complaints.

Modified:
   trunk/configure
   trunk/libvo/vo_sdl.c

Modified: trunk/configure
==============================================================================
--- trunk/configure	Sat Apr 24 19:02:50 2010	(r31066)
+++ trunk/configure	Sat Apr 24 19:15:28 2010	(r31067)
@@ -5396,15 +5396,7 @@ EOF
       _ld_tmp="$($_sdlconfig --libs)"
     fi
     if cc_check $_inc_tmp $_ld_tmp >>"$TMPLOG" 2>&1 ; then
-      _sdlversion=$($_sdlconfig --version | sed 's/[^0-9]//g')
-        if test "$_sdlversion" -gt 116 ; then
-          if test "$_sdlversion" -lt 121 ; then
-            def_sdlbuggy='#define BUGGY_SDL'
-          else
-            def_sdlbuggy='#undef BUGGY_SDL'
-          fi
           _sdl=yes
-        fi
      fi
   fi
 fi
@@ -9096,7 +9088,6 @@ $def_quartz
 $def_s3fb
 $def_sdl
 $def_sdl_sdl_h
-$def_sdlbuggy
 $def_svga
 $def_tdfxfb
 $def_tdfxvid

Modified: trunk/libvo/vo_sdl.c
==============================================================================
--- trunk/libvo/vo_sdl.c	Sat Apr 24 19:02:50 2010	(r31066)
+++ trunk/libvo/vo_sdl.c	Sat Apr 24 19:15:28 2010	(r31067)
@@ -48,8 +48,6 @@
 /* define to enable surface locks, this might be needed on SMP machines */
 #undef SDL_ENABLE_LOCKS
 
-//#define BUGGY_SDL //defined by configure
-
 /* MONITOR_ASPECT MUST BE FLOAT */
 #define MONITOR_ASPECT 4.0/3.0
 
@@ -457,13 +455,11 @@ static int sdl_open (void *plugin, void 
 	 * We use SDL_KEYUP cause SDL_KEYDOWN seems to cause problems
 	 * with keys need to be pressed twice, to be recognized.
 	 */
-#ifndef BUGGY_SDL
 	SDL_EventState(SDL_ACTIVEEVENT, SDL_IGNORE);
 	SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE);
 //	SDL_EventState(SDL_QUIT, SDL_IGNORE);
 	SDL_EventState(SDL_SYSWMEVENT, SDL_IGNORE);
 	SDL_EventState(SDL_USEREVENT, SDL_IGNORE);
-#endif
 
 	/* Success! */
 	return 0;
@@ -1141,26 +1137,7 @@ static void check_events (void)
 				break;
 
 			/* graphics mode selection shortcuts */
-#ifdef BUGGY_SDL
 			case SDL_KEYDOWN:
-				switch(event.key.keysym.sym) {
-                                case SDLK_UP: mplayer_put_key(KEY_UP); break;
-                                case SDLK_DOWN: mplayer_put_key(KEY_DOWN); break;
-                                case SDLK_LEFT: mplayer_put_key(KEY_LEFT); break;
-                                case SDLK_RIGHT: mplayer_put_key(KEY_RIGHT); break;
-                                case SDLK_LESS: mplayer_put_key(shift_key?'>':'<'); break;
-                                case SDLK_GREATER: mplayer_put_key('>'); break;
-                                case SDLK_ASTERISK:
-				case SDLK_KP_MULTIPLY:
-				case SDLK_SLASH:
-				case SDLK_KP_DIVIDE:
-				default: break;
-				}
-			break;
-			case SDL_KEYUP:
-#else
-			case SDL_KEYDOWN:
-#endif
 				keypressed = event.key.keysym.sym;
  				mp_msg(MSGT_VO,MSGL_DBG2, "SDL: Key pressed: '%i'\n", keypressed);
 
@@ -1219,17 +1196,6 @@ static void check_events (void)
 				case SDLK_TAB: mplayer_put_key('\t');break;
 				case SDLK_PAGEUP: mplayer_put_key(KEY_PAGE_UP);break;
 				case SDLK_PAGEDOWN: mplayer_put_key(KEY_PAGE_DOWN);break;
-#ifdef BUGGY_SDL
-                                case SDLK_UP:
-                                case SDLK_DOWN:
-                                case SDLK_LEFT:
-                                case SDLK_RIGHT:
-                                case SDLK_ASTERISK:
-				case SDLK_KP_MULTIPLY:
-				case SDLK_SLASH:
-				case SDLK_KP_DIVIDE:
-				break;
-#else
                                 case SDLK_UP: mplayer_put_key(KEY_UP);break;
                                 case SDLK_DOWN: mplayer_put_key(KEY_DOWN);break;
                                 case SDLK_LEFT: mplayer_put_key(KEY_LEFT);break;
@@ -1240,7 +1206,6 @@ static void check_events (void)
 				case SDLK_KP_MULTIPLY: mplayer_put_key('*'); break;
 				case SDLK_SLASH:
 				case SDLK_KP_DIVIDE: mplayer_put_key('/'); break;
-#endif
 				case SDLK_KP0: mplayer_put_key(KEY_KP0); break;
 				case SDLK_KP1: mplayer_put_key(KEY_KP1); break;
 				case SDLK_KP2: mplayer_put_key(KEY_KP2); break;


More information about the MPlayer-cvslog mailing list