shithub: qk2

Download patch

ref: 1e4ae34f57695d9966ca8243c09f81dbb2e35462
parent: f2610965a9308c7f16fef90138ad2768ba162440
author: qwx <qwx@sciops.net>
date: Tue Jul 20 21:33:13 EDT 2021

vid: actual minimum sensible scaling resolution is 320x240

--- a/vid.c
+++ b/vid.c
@@ -197,12 +197,17 @@
 	char *s, *p;
 	static cvar_t *scale;
 
+	/* the actual minimum if you want to go that far is 100x28,
+	 * the minimum size of a rio window; the engine handles it
+	 * just fine */
 	scale = Cvar_Get("scale", "", 0);
-	if(strlen(scale->string) < 3+1+3)
+	if(strlen(scale->string) < 3+1+3){
+		fprint(2, "setscale: invalid resolution\n");
 		return;
+	}
 	s = scale->string;
 	vid.width = strtol(s, &p, 10);
-	if(p == s || vid.width < 320){
+	if(p == s || vid.width < 320){	/* actual minimum is minimum
 		fprint(2, "setscale: invalid width %d\n", vid.width);
 		return;
 	}
@@ -211,7 +216,7 @@
 		return;
 	}
 	vid.height = strtol(p, &s, 10);
-	if(p == s || vid.height < 200){
+	if(p == s || vid.height < 240){
 		fprint(2, "setscale: invalid height %d\n", vid.height);
 		return;
 	}