comparison src/video/SDL_gamma.c @ 1734:f7c667ded87d SDL-1.3

The general code handles restoring video mode/gamma/etc. when the window loses focus. Support for changing fullscreen/windowed mode in progress.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 09 Jul 2006 18:09:16 +0000
parents 0b1070f2f94d
children
comparison
equal deleted inserted replaced
1733:0b1070f2f94d 1734:f7c667ded87d
150 } 150 }
151 151
152 /* Try to set the gamma ramp in the driver */ 152 /* Try to set the gamma ramp in the driver */
153 succeeded = -1; 153 succeeded = -1;
154 if (_this && _this->SetDisplayGammaRamp) { 154 if (_this && _this->SetDisplayGammaRamp) {
155 succeeded = 155 if (SDL_GetFocusWindow()) {
156 _this->SetDisplayGammaRamp(_this, SDL_CurrentDisplay.gamma); 156 succeeded =
157 _this->SetDisplayGammaRamp(_this, SDL_CurrentDisplay.gamma);
158 } else {
159 succeeded = 0;
160 }
157 } else { 161 } else {
158 SDL_SetError("Gamma ramp manipulation not supported"); 162 SDL_SetError("Gamma ramp manipulation not supported");
159 } 163 }
160 return succeeded; 164 return succeeded;
161 } 165 }