From ac25cc59420ad1ee8b5f5f48aad8a01e17412572 Mon Sep 17 00:00:00 2001
From: Toni Spets <toni.spets@iki.fi>
Date: Tue, 18 Oct 2011 21:45:44 +0300
Subject: [PATCH] Fix major bug in OpenGL renderer's texture size, used NPOT
 textures if your target resolution was over 1024x1024, it was supposed to
 check the actual game resolution instead

---
 render.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/render.c b/render.c
index 418d38c..dac6f0a 100644
--- a/render.c
+++ b/render.c
@@ -30,8 +30,8 @@ DWORD WINAPI render_main(void)
     int i,j;
     HGLRC hRC;
 
-    int tex_width = ddraw->render.width > 1024 ? ddraw->render.width : 1024;
-    int tex_height = ddraw->render.height > 1024 ? ddraw->render.height : 1024;
+    int tex_width = ddraw->width > 1024 ? ddraw->width : 1024;
+    int tex_height = ddraw->height > 1024 ? ddraw->height : 1024;
     float scale_w = 1.0f;
     float scale_h = 1.0f;
     int *tex = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, tex_width * tex_height * sizeof(int));