shithub: choc

Download patch

ref: e29c27e31acb04e67a715b9a2722c09b9574d374
parent: 142a9488ad2e782d3d699b4f9b2902ffe26aeaa2
author: Simon Howard <fraggle@gmail.com>
date: Sat Jan 19 23:59:50 EST 2008

Add -width, -height command line parameters for specifying the screen
mode.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1006

--- a/src/i_video.c
+++ b/src/i_video.c
@@ -854,6 +854,8 @@
 
 static void CheckCommandLine(void)
 {
+    int i;
+
     //!
     // @category video 
     //
@@ -909,6 +911,31 @@
 
     nomouse = M_CheckParm("-nomouse") > 0;
 
+    //!
+    // @category video
+    //
+    // Specify the screen width, in pixels.
+    //
+
+    i = M_CheckParm("-width");
+
+    if (i > 0)
+    {
+        screen_width = atoi(myargv[i + 1]);
+    }
+
+    //!
+    // @category video
+    //
+    // Specify the screen height, in pixels.
+    //
+
+    i = M_CheckParm("-height");
+
+    if (i > 0)
+    {
+        screen_height = atoi(myargv[i + 1]);
+    }
 }
 
 // Pick the modes list to use: