gl_vidsdl.c (VID_Restart): make sure that scr_conscale.value is positive

in conwidth and conheight recalculation (fitzquake-0.85 change).


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@122 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2010-04-23 06:55:20 +00:00
parent cd19b2c7a9
commit b5e526686d

View file

@ -435,7 +435,7 @@ void VID_Restart (void)
TexMgr_RecalcWarpImageSize ();
//conwidth and conheight need to be recalculated
vid.conwidth = (scr_conwidth.value > 0) ? (int)scr_conwidth.value : vid.width;
vid.conwidth = (scr_conwidth.value > 0) ? (int)scr_conwidth.value : (scr_conscale.value > 0) ? (int)(vid.width/scr_conscale.value) : vid.width;
vid.conwidth = CLAMP (320, vid.conwidth, vid.width);
vid.conwidth &= 0xFFFFFFF8;
vid.conheight = vid.conwidth * vid.height / vid.width;