From db43cf1836838a7dcb303c2a49334c4c4d099adc Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Mon, 8 Sep 2014 06:25:59 +0000 Subject: [PATCH] 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 --- Quake/gl_screen.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Quake/gl_screen.c b/Quake/gl_screen.c index dbf8218b..7791eeab 100644 --- a/Quake/gl_screen.c +++ b/Quake/gl_screen.c @@ -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; }