summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Howard2008-01-30 19:09:31 +0000
committerSimon Howard2008-01-30 19:09:31 +0000
commit89c9c25122a3f942626f64a64ccde69a85c5cadb (patch)
treeffbf745434266479f3e6e567ef90a0e08f11cc63 /src
parentd9ba3b3810e360e23dab0d0874b114c634ca5361 (diff)
downloadchocolate-doom-89c9c25122a3f942626f64a64ccde69a85c5cadb.tar.gz
chocolate-doom-89c9c25122a3f942626f64a64ccde69a85c5cadb.tar.bz2
chocolate-doom-89c9c25122a3f942626f64a64ccde69a85c5cadb.zip
Be more accurate in describing windowboxed modes as either
"pillarboxed", "letterboxed" or "windowboxed". Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1036
Diffstat (limited to 'src')
-rw-r--r--src/i_video.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/i_video.c b/src/i_video.c
index 7732c63d..f94b7192 100644
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -1334,6 +1334,26 @@ static void SetSDLVideoDriver(void)
#endif
}
+static char *WindowBoxType(screen_mode_t *mode, int w, int h)
+{
+ if (mode->width != w && mode->height != h)
+ {
+ return "Windowboxed";
+ }
+ else if (mode->width == w)
+ {
+ return "Letterboxed";
+ }
+ else if (mode->height == h)
+ {
+ return "Pillarboxed";
+ }
+ else
+ {
+ return "...";
+ }
+}
+
void I_InitGraphics(void)
{
SDL_Event dummy;
@@ -1397,7 +1417,8 @@ void I_InitGraphics(void)
if (windowwidth != screen_mode->width
|| windowheight != screen_mode->height)
{
- printf("I_InitGraphics: Letterboxed (%ix%i within %ix%i)\n",
+ printf("I_InitGraphics: %s (%ix%i within %ix%i)\n",
+ WindowBoxType(screen_mode, windowwidth, windowheight),
screen_mode->width, screen_mode->height,
windowwidth, windowheight);
}