summaryrefslogtreecommitdiff
path: root/src/sdl
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2015-06-08 23:08:29 +0100
committerTim Angus <tim@ngus.net>2015-06-08 23:08:29 +0100
commitb8b66865c8ff4c756fe3544decb5504dbc2abdf7 (patch)
tree457bf7a5042c7e3a35d0df9a62c5e3a0e2702bb8 /src/sdl
parentd08a64c55393521f3b4c600115ea99ebaab3db40 (diff)
parentd487b1a69f8961b9d4f8658c2e2ae3c272acd2cb (diff)
Merge pull request #10 from jkent/master
fix initialization based on r_width and r_height
Diffstat (limited to 'src/sdl')
-rw-r--r--src/sdl/sdl_glimp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/sdl/sdl_glimp.c b/src/sdl/sdl_glimp.c
index 69cdb374..51b448a2 100644
--- a/src/sdl/sdl_glimp.c
+++ b/src/sdl/sdl_glimp.c
@@ -261,9 +261,14 @@ static int GLimp_SetMode( qboolean failSafe, qboolean fullscreen, qboolean nobor
if( !failSafe )
{
- // use desktop video resolution
- if( desktopMode.h > 0 )
+ if( r_width->integer > 0 && r_height->integer > 0 )
{
+ glConfig.vidWidth = r_width->integer;
+ glConfig.vidHeight = r_height->integer;
+ }
+ else if( desktopMode.h > 0 )
+ {
+ // use desktop video resolution
glConfig.vidWidth = desktopMode.w;
glConfig.vidHeight = desktopMode.h;
}