foxygit / doom Log in
commit e29c27e31acb04e67a715b9a2722c09b9574d374
Author:     Simon Howard <fraggle@gmail.com>
AuthorDate: Sun Jan 20 04:59:50 2008 +0000
Commit:     Simon Howard <fraggle@gmail.com>
CommitDate: Sun Jan 20 04:59:50 2008 +0000

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

    Subversion-branch: /trunk/chocolate-doom
    Subversion-revision: 1006
---
 src/i_video.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/src/i_video.c b/src/i_video.c
index 22b4c98c..0d1b612b 100644
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -854,6 +854,8 @@ void I_SetWindowIcon(void)

 static void CheckCommandLine(void)
 {
+    int i;
+
     //!
     // @category video
     //
@@ -909,6 +911,31 @@ static void CheckCommandLine(void)

     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: