summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Howard2008-01-20 04:59:50 +0000
committerSimon Howard2008-01-20 04:59:50 +0000
commite29c27e31acb04e67a715b9a2722c09b9574d374 (patch)
treedd2519385050ff68a00d65ae818852ead406e94b /src
parent142a9488ad2e782d3d699b4f9b2902ffe26aeaa2 (diff)
downloadchocolate-doom-e29c27e31acb04e67a715b9a2722c09b9574d374.tar.gz
chocolate-doom-e29c27e31acb04e67a715b9a2722c09b9574d374.tar.bz2
chocolate-doom-e29c27e31acb04e67a715b9a2722c09b9574d374.zip
Add -width, -height command line parameters for specifying the screen
mode. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1006
Diffstat (limited to 'src')
-rw-r--r--src/i_video.c27
1 files changed, 27 insertions, 0 deletions
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: