From b6348eb0515b14bc7207d64da20baf0f76f30d8f Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 20 Feb 2002 01:02:33 +0000 Subject: [PATCH] Fixed SDL_OPENGLBLIT with OpenGL API newer than 1.2 --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40283 --- src/video/SDL_video.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index c75b51ca..a440629d 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -728,11 +728,9 @@ do { \ 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,