[quake3-commits] r1706 - in trunk/code: sdl sys

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Oct 25 18:36:32 EDT 2009


Author: tma
Date: 2009-10-25 18:36:32 -0400 (Sun, 25 Oct 2009)
New Revision: 1706

Modified:
   trunk/code/sdl/sdl_glimp.c
   trunk/code/sys/sys_local.h
Log:
* Bump the minimum SDL version up to 1.2.10, and remove workarounds for earlier versions

Modified: trunk/code/sdl/sdl_glimp.c
===================================================================
--- trunk/code/sdl/sdl_glimp.c	2009-10-25 21:54:45 UTC (rev 1705)
+++ trunk/code/sdl/sdl_glimp.c	2009-10-25 22:36:32 UTC (rev 1706)
@@ -26,13 +26,6 @@
 #	include <SDL.h>
 #endif
 
-#if !SDL_VERSION_ATLEAST(1, 2, 10)
-#define SDL_GL_ACCELERATED_VISUAL 15
-#define SDL_GL_SWAP_CONTROL 16
-#elif MINSDL_PATCH >= 10
-#error Code block no longer necessary, please remove
-#endif
-
 #ifdef SMP
 #	ifdef USE_LOCAL_HEADERS
 #		include "SDL_thread.h"
@@ -152,17 +145,9 @@
 	SDL_Rect **modes;
 	int numModes;
 	int i;
-	SDL_PixelFormat *format = NULL;
 
-#if SDL_VERSION_ATLEAST(1, 2, 10)
-	format = videoInfo->vfmt;
-#	if MINSDL_PATCH >= 10
-#		error Ifdeffery no longer necessary, please remove
-#	endif
-#endif
+	modes = SDL_ListModes( videoInfo->vfmt, SDL_OPENGL | SDL_FULLSCREEN );
 
-	modes = SDL_ListModes( format, SDL_OPENGL | SDL_FULLSCREEN );
-
 	if( !modes )
 	{
 		ri.Printf( PRINT_WARNING, "Can't get list of available modes\n" );
@@ -219,12 +204,6 @@
 	if ( r_allowResize->integer )
 		flags |= SDL_RESIZABLE;
 
-#if !SDL_VERSION_ATLEAST(1, 2, 10)
-	// 1.2.10 is needed to get the desktop resolution
-	displayAspect = 4.0f / 3.0f;
-#elif MINSDL_PATCH >= 10
-#	error Ifdeffery no longer necessary, please remove
-#else
 	if( videoInfo == NULL )
 	{
 		static SDL_VideoInfo sVideoInfo;
@@ -254,7 +233,6 @@
 					"Cannot estimate display aspect, assuming 1.333\n" );
 		}
 	}
-#endif
 
 	ri.Printf (PRINT_ALL, "...setting mode %d:", mode );
 

Modified: trunk/code/sys/sys_local.h
===================================================================
--- trunk/code/sys/sys_local.h	2009-10-25 21:54:45 UTC (rev 1705)
+++ trunk/code/sys/sys_local.h	2009-10-25 22:36:32 UTC (rev 1706)
@@ -26,7 +26,7 @@
 // Require a minimum version of SDL
 #define MINSDL_MAJOR 1
 #define MINSDL_MINOR 2
-#define MINSDL_PATCH 7
+#define MINSDL_PATCH 10
 
 // Input subsystem
 void IN_Init( void );



More information about the quake3-commits mailing list