changeset 282:b42d80e73896

Fixed SDL_OPENGLBLIT with OpenGL API newer than 1.2
author Sam Lantinga <slouken@libsdl.org>
date Wed, 20 Feb 2002 01:02:33 +0000
parents c5010ab8ba35
children 3d8b6b9f1e18
files src/video/SDL_video.c
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/SDL_video.c	Sun Feb 17 19:54:28 2002 +0000
+++ b/src/video/SDL_video.c	Wed Feb 20 01:02:33 2002 +0000
@@ -728,11 +728,9 @@
 		   support the GL_UNSIGNED_SHORT_5_6_5 texture format.
 		 */
 		if ( (bpp == 16) &&
-		     (strstr((const char *)video->glGetString(GL_EXTENSIONS),
-		                           "GL_EXT_packed_pixels") ||
-		     (strncmp((const char *)video->glGetString(GL_VERSION),
-		              "1.2", 3) == 0)) )
-		{
+		     (strstr((const char *)video->glGetString(GL_EXTENSIONS), "GL_EXT_packed_pixels") ||
+		     (atof((const char *)video->glGetString(GL_VERSION)) >= 1.2f))
+		   ) {
 			video->is_32bit = 0;
 			SDL_VideoSurface = SDL_CreateRGBSurface(
 				flags,