diff options
author | Tim Angus <tim@ngus.net> | 2013-09-15 23:54:52 +0100 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2014-08-28 11:03:18 +0100 |
commit | 29cabf44ea31a69cc8fe8340d1ed5010dec782b0 (patch) | |
tree | c94ca8038e2fcdc646dcdd35bfb722ac94b988aa /src/sdl/sdl_glimp.c | |
parent | d8ab1e28a1a7c85bacb3c294e908a3252f211f0f (diff) |
Various fixes from Fuma
Diffstat (limited to 'src/sdl/sdl_glimp.c')
-rw-r--r-- | src/sdl/sdl_glimp.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/sdl/sdl_glimp.c b/src/sdl/sdl_glimp.c index 34d24a15..1c0f0194 100644 --- a/src/sdl/sdl_glimp.c +++ b/src/sdl/sdl_glimp.c @@ -47,7 +47,7 @@ typedef enum } rserr_t; SDL_Window *SDL_window = NULL; -static SDL_GLContext *SDL_glContext = NULL; +static SDL_GLContext SDL_glContext = NULL; cvar_t *r_allowSoftwareGL; // Don't abort out if a hardware visual can't be obtained cvar_t *r_allowResize; // make window resizable @@ -107,8 +107,8 @@ GLimp_CompareModes static int GLimp_CompareModes( const void *a, const void *b ) { const float ASPECT_EPSILON = 0.001f; - SDL_Rect *modeA = (SDL_Rect *)&a; - SDL_Rect *modeB = (SDL_Rect *)&b; + SDL_Rect *modeA = (SDL_Rect *)a; + SDL_Rect *modeB = (SDL_Rect *)b; float aspectA = (float)modeA->w / (float)modeA->h; float aspectB = (float)modeB->w / (float)modeB->h; int areaA = modeA->w * modeA->h; @@ -463,12 +463,6 @@ static int GLimp_SetMode( qboolean failSafe, qboolean fullscreen, qboolean nobor continue; } - if( SDL_GL_MakeCurrent( SDL_window, SDL_glContext ) < 0 ) - { - ri.Printf( PRINT_DEVELOPER, "SDL_GL_MakeCurrent failed: %s\n", SDL_GetError( ) ); - continue; - } - SDL_GL_SetSwapInterval( r_swapInterval->integer ); glConfig.colorBits = testColorBits; |