foxygit / doom Log in
commit 429b112dedf4a4313ab0162d9f515a4d812c3049
Author:     Michael Day <43701387+mikeday0@users.noreply.github.com>
AuthorDate: Fri Dec 29 03:30:55 2023 -0500
Commit:     GitHub <noreply@github.com>
CommitDate: Fri Dec 29 09:30:55 2023 +0100

    Fix `-1`, `-2` and `-3` command-line options (#1652)
---
 src/i_video.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/i_video.c b/src/i_video.c
index 4e650ec6..9d9c8ccb 100644
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -917,10 +917,20 @@ void I_InitWindowIcon(void)

 static void SetScaleFactor(int factor)
 {
+    int height;
+
     // Pick 320x200 or 320x240, depending on aspect ratio correct
+    if (aspect_ratio_correct)
+    {
+        height = SCREENHEIGHT_4_3;
+    }
+    else
+    {
+        height = SCREENHEIGHT;
+    }

     window_width = factor * SCREENWIDTH;
-    window_height = factor * actualheight;
+    window_height = factor * height;
     fullscreen = false;
 }