From 39888c9d127f2792453a42bd1c3bbc4fadfc78da Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Fri, 18 Jan 2013 21:53:37 +0000 Subject: Allow hardware gamma, in theory --- src/sdl/sdl_glimp.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/sdl') diff --git a/src/sdl/sdl_glimp.c b/src/sdl/sdl_glimp.c index da29f704..fb40dbdc 100644 --- a/src/sdl/sdl_glimp.c +++ b/src/sdl/sdl_glimp.c @@ -762,18 +762,12 @@ void GLimp_Init( void ) ri.Error( ERR_FATAL, "GLimp_Init() - could not load OpenGL subsystem" ); success: - // This values force the UI to disable driver selection + // These values force the UI to disable driver selection glConfig.driverType = GLDRV_ICD; glConfig.hardwareType = GLHW_GENERIC; - // FIXME No SDL_SetGamma in SDL2? - /*glConfig.deviceSupportsGamma = SDL_SetGamma( 1.0f, 1.0f, 1.0f ) >= 0;*/ - - // Mysteriously, if you use an NVidia graphics card and multiple monitors, - // SDL_SetGamma will incorrectly return false... the first time; ask - // again and you get the correct answer. This is a suspected driver bug, see - // http://bugzilla.icculus.org/show_bug.cgi?id=4316 - /*glConfig.deviceSupportsGamma = SDL_SetGamma( 1.0f, 1.0f, 1.0f ) >= 0;*/ + // Only using SDL_SetWindowBrightness to determine if hardware gamma is supported + glConfig.deviceSupportsGamma = SDL_SetWindowBrightness( SDL_window, 1.0f ) >= 0; if ( -1 == r_ignorehwgamma->integer) glConfig.deviceSupportsGamma = 1; -- cgit