shithub: choc

Download patch

ref: 10db74bbd140e5b36e55e9b21df0d6143a95d275
parent: 7c5fb110e2293ff7d1e38875ca63fb683575d921
author: Fabian Greffrath <fabian@greffrath.com>
date: Sun Aug 7 14:18:27 EDT 2016

CreateUpscaledTexture(): set max texture dimensions more generally

Think of forks for which the native resolution isn't 320x200. ;)

No functional changes for Chocolate Doom!

--- a/src/i_video.c
+++ b/src/i_video.c
@@ -576,13 +576,13 @@
     // Limit maximum texture dimensions to 1600x1200.
     // It's really diminishing returns at this point.
 
-    if (w_upscale > 5)
+    if (w_upscale * SCREENWIDTH > 1600)
     {
-        w_upscale = 5;
+        w_upscale = 1600 / SCREENWIDTH;
     }
-    if (h_upscale > 6)
+    if (h_upscale * SCREENHEIGHT > 1200)
     {
-        h_upscale = 6;
+        h_upscale = 1200 / SCREENHEIGHT;
     }
 
     // Create a new texture only if the upscale factors have actually changed.