From 631baaaa1a91181ed96030ad4d965133228df535 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Wed, 6 Feb 2008 23:42:29 +0000 Subject: Add -geometry command line parameter to allow the screen size to be specified with one combined option. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1056 --- src/i_video.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/i_video.c b/src/i_video.c index f94b7192..98eb41ac 100644 --- a/src/i_video.c +++ b/src/i_video.c @@ -1201,6 +1201,7 @@ static void CheckCommandLine(void) //! // @category video + // @arg // // Specify the screen width, in pixels. // @@ -1214,6 +1215,7 @@ static void CheckCommandLine(void) //! // @category video + // @arg // // Specify the screen height, in pixels. // @@ -1225,6 +1227,26 @@ static void CheckCommandLine(void) screen_height = atoi(myargv[i + 1]); } + //! + // @category video + // @arg + // + // Specify the screen mode (when running fullscreen) or the window + // dimensions (when running in windowed mode). + + i = M_CheckParm("-geometry"); + + if (i > 0) + { + int w, h; + + if (sscanf(myargv[i + 1], "%ix%i", &w, &h) == 2) + { + screen_width = w; + screen_height = h; + } + } + //! // @category video // -- cgit v1.2.3