From e29c27e31acb04e67a715b9a2722c09b9574d374 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 20 Jan 2008 04:59:50 +0000 Subject: 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: -- cgit v1.2.3