diff options
author | Simon Howard | 2008-02-06 23:42:29 +0000 |
---|---|---|
committer | Simon Howard | 2008-02-06 23:42:29 +0000 |
commit | 631baaaa1a91181ed96030ad4d965133228df535 (patch) | |
tree | 8555a36792db7e15db57e865f0cd152c012d7870 | |
parent | 85b1dacd10a913c4988fa62251c4553e8d19ca98 (diff) | |
download | chocolate-doom-631baaaa1a91181ed96030ad4d965133228df535.tar.gz chocolate-doom-631baaaa1a91181ed96030ad4d965133228df535.tar.bz2 chocolate-doom-631baaaa1a91181ed96030ad4d965133228df535.zip |
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
-rw-r--r-- | src/i_video.c | 22 |
1 files changed, 22 insertions, 0 deletions
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 <x> // // Specify the screen width, in pixels. // @@ -1214,6 +1215,7 @@ static void CheckCommandLine(void) //! // @category video + // @arg <y> // // Specify the screen height, in pixels. // @@ -1227,6 +1229,26 @@ static void CheckCommandLine(void) //! // @category video + // @arg <WxY> + // + // 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 // // Don't scale up the screen. // |