From d056e82b3b271952e17bc99a8a35d34ca979718e Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Thu, 13 Nov 2014 18:20:32 -0600 Subject: [PATCH] Parse GL version correctly. --- src/hardware/r_opengl/r_opengl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index 6b37a666..028bc988 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -535,7 +535,7 @@ boolean SetupGLFunc13(void) // Parse the GL version if (version != NULL) { - if (sscanf(version, "%d.%d", &glmajor, &glminor) == 2) + if (sscanf((const char*)version, "%d.%d", &glmajor, &glminor) == 2) { // Look, we gotta prepare for the inevitable arrival of GL 2.0 code... switch (glmajor) @@ -543,6 +543,10 @@ boolean SetupGLFunc13(void) case 1: if (glminor == 3) gl13 = true; break; + case 2: + case 3: + case 4: + gl13 = true; default: break; } @@ -2400,12 +2404,8 @@ EXPORT void HWRAPI(MakeScreenFinalTexture) (void) EXPORT void HWRAPI(DrawScreenFinalTexture)(int width, int height) { float xfix, yfix; - int lmaxx, lmaxy; INT32 texsize = 2048; - lmaxx = width < screen_width ? screen_width : width; - lmaxy = height < screen_height ? screen_height : height; - if(screen_width <= 1024) texsize = 1024; if(screen_width <= 512)