From d487b1a69f8961b9d4f8658c2e2ae3c272acd2cb Mon Sep 17 00:00:00 2001 From: /dev/humancontroller Date: Sat, 18 Apr 2015 15:50:15 -0500 Subject: fix initialization based on r_width and r_height let the cvars default to "0"; upon video startup, if any of these are non-positive, try to pick up the desktop's resolution, and update the cvars --- src/renderergl2/tr_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/renderergl2') diff --git a/src/renderergl2/tr_init.c b/src/renderergl2/tr_init.c index dcb37d2c..ea62249a 100644 --- a/src/renderergl2/tr_init.c +++ b/src/renderergl2/tr_init.c @@ -1098,8 +1098,8 @@ void R_Register( void ) r_mode = ri.Cvar_Get( "r_mode", "-2", CVAR_ARCHIVE | CVAR_LATCH ); r_fullscreen = ri.Cvar_Get( "r_fullscreen", "1", CVAR_ARCHIVE ); r_noborder = ri.Cvar_Get("r_noborder", "0", CVAR_ARCHIVE | CVAR_LATCH); - r_width = ri.Cvar_Get( "r_width", "640", CVAR_ARCHIVE | CVAR_LATCH ); - r_height = ri.Cvar_Get( "r_height", "480", CVAR_ARCHIVE | CVAR_LATCH ); + r_width = ri.Cvar_Get( "r_width", "0", CVAR_ARCHIVE | CVAR_LATCH ); + r_height = ri.Cvar_Get( "r_height", "0", CVAR_ARCHIVE | CVAR_LATCH ); r_pixelAspect = ri.Cvar_Get( "r_pixelAspect", "1", CVAR_ARCHIVE | CVAR_LATCH ); r_simpleMipMaps = ri.Cvar_Get( "r_simpleMipMaps", "1", CVAR_ARCHIVE | CVAR_LATCH ); r_vertexLight = ri.Cvar_Get( "r_vertexLight", "0", CVAR_ARCHIVE | CVAR_LATCH ); -- cgit