From 1593b023a85b13a0b6e5c7ebf7af46f87fa311e1 Mon Sep 17 00:00:00 2001 From: sezero Date: Mon, 26 Apr 2010 13:37:56 +0000 Subject: [PATCH] gl_vidsdl.c (VID_Init): If -height is not specified on the command line, initialize height to width*3/4 which avoids a compiler warning. gl_vidnt.c (VID_Init): Likewise. git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@148 af15c1b1-3010-417e-b628-4374ebc0bcbd --- Quake/gl_vidnt.c | 2 ++ Quake/gl_vidsdl.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Quake/gl_vidnt.c b/Quake/gl_vidnt.c index 63bcbc32..e1fc2b82 100644 --- a/Quake/gl_vidnt.c +++ b/Quake/gl_vidnt.c @@ -2179,6 +2179,8 @@ void VID_Init (void) if (COM_CheckParm("-height")) height = Q_atoi(com_argv[COM_CheckParm("-height")+1]); + else + height = width * 3 / 4; // assume 4:3 aspect ratio // if they want to force it, add the specified mode to the list if (COM_CheckParm("-force") && (nummodes < MAX_MODE_LIST)) diff --git a/Quake/gl_vidsdl.c b/Quake/gl_vidsdl.c index cdb59425..9c932be0 100644 --- a/Quake/gl_vidsdl.c +++ b/Quake/gl_vidsdl.c @@ -1262,6 +1262,8 @@ void VID_Init (void) if (COM_CheckParm("-height")) height = Q_atoi(com_argv[COM_CheckParm("-height")+1]); + else + height = width * 3 / 4; // assume 4:3 aspect ratio // if they want to force it, add the specified mode to the list if (COM_CheckParm("-force") && (nummodes < MAX_MODE_LIST))