From 83165ea05edee6ed7ee33f951e90bfbdadb977f8 Mon Sep 17 00:00:00 2001 From: icculus Date: Mon, 14 Sep 2009 22:07:34 +0000 Subject: Allow optional window resizing. Fixes Bugzilla #2844. git-svn-id: svn://svn.icculus.org/quake3/trunk@1594 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/sdl/sdl_glimp.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'code/sdl/sdl_glimp.c') diff --git a/code/sdl/sdl_glimp.c b/code/sdl/sdl_glimp.c index ba08ade..59c1e53 100644 --- a/code/sdl/sdl_glimp.c +++ b/code/sdl/sdl_glimp.c @@ -79,6 +79,7 @@ static SDL_Surface *screen = NULL; static const SDL_VideoInfo *videoInfo = NULL; cvar_t *r_allowSoftwareGL; // Don't abort out if a hardware visual can't be obtained +cvar_t *r_allowResize; // make window resizable cvar_t *r_sdlDriver; void (APIENTRYP qglActiveTextureARB) (GLenum texture); @@ -215,6 +216,9 @@ static int GLimp_SetMode( int mode, qboolean fullscreen ) ri.Printf( PRINT_ALL, "Initializing OpenGL display\n"); + if ( r_allowResize->integer ) + flags |= SDL_RESIZABLE; + #if !SDL_VERSION_ATLEAST(1, 2, 10) // 1.2.10 is needed to get the desktop resolution displayAspect = 4.0f / 3.0f; @@ -667,6 +671,7 @@ void GLimp_Init( void ) { r_allowSoftwareGL = ri.Cvar_Get( "r_allowSoftwareGL", "0", CVAR_LATCH ); r_sdlDriver = ri.Cvar_Get( "r_sdlDriver", "", CVAR_ROM ); + r_allowResize = ri.Cvar_Get( "r_allowResize", "0", CVAR_ARCHIVE ); Sys_GLimpInit( ); -- cgit v1.2.3