gl_screen.c: make the console speed independent of the current resolution. Before, switching to a really high (e.g. 2880x1800) resolution would make the colsole take several seconds to open/close

Not totally sure about this but i think it's a decent idea. I'm using 800x600 as a reference screen size (arbitrary choice but it's the default QS resolution). So if your resolution is 600 pixels tall this will make no difference. On higher resolutions this will make the console a bit faster than before.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@992 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Eric Wasylishen 2014-09-08 06:25:59 +00:00
parent d8a33d73cc
commit db43cf1836
1 changed files with 4 additions and 2 deletions

View File

@ -709,14 +709,16 @@ void SCR_SetUpToDrawConsole (void)
if (scr_conlines < scr_con_current)
{
scr_con_current -= scr_conspeed.value*host_frametime/timescale; //johnfitz -- timescale
// ericw -- (glheight/600.0) factor makes conspeed resolution independent, using 800x600 as a baseline
scr_con_current -= scr_conspeed.value*(glheight/600.0)*host_frametime/timescale; //johnfitz -- timescale
if (scr_conlines > scr_con_current)
scr_con_current = scr_conlines;
}
else if (scr_conlines > scr_con_current)
{
scr_con_current += scr_conspeed.value*host_frametime/timescale; //johnfitz -- timescale
// ericw -- (glheight/600.0)
scr_con_current += scr_conspeed.value*(glheight/600.0)*host_frametime/timescale; //johnfitz -- timescale
if (scr_conlines < scr_con_current)
scr_con_current = scr_conlines;
}