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
This commit is contained in:
sezero 2010-04-26 13:37:56 +00:00
parent 107d7e932e
commit 1593b023a8
2 changed files with 4 additions and 0 deletions

View file

@ -2179,6 +2179,8 @@ void VID_Init (void)
if (COM_CheckParm("-height")) if (COM_CheckParm("-height"))
height = Q_atoi(com_argv[COM_CheckParm("-height")+1]); 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 they want to force it, add the specified mode to the list
if (COM_CheckParm("-force") && (nummodes < MAX_MODE_LIST)) if (COM_CheckParm("-force") && (nummodes < MAX_MODE_LIST))

View file

@ -1262,6 +1262,8 @@ void VID_Init (void)
if (COM_CheckParm("-height")) if (COM_CheckParm("-height"))
height = Q_atoi(com_argv[COM_CheckParm("-height")+1]); 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 they want to force it, add the specified mode to the list
if (COM_CheckParm("-force") && (nummodes < MAX_MODE_LIST)) if (COM_CheckParm("-force") && (nummodes < MAX_MODE_LIST))