diff options
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client.cpp b/src/client.cpp index 7c04e807e..aeee05c1f 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -2906,7 +2906,8 @@ void Client::applyGamma() { const float val = config.getFloatValue("gamma"); #ifdef USE_SDL2 - SDL_SetWindowBrightness(mWindow, val); + if (mainGraphics) + SDL_SetWindowBrightness(mainGraphics->getWindow(), val); #else SDL_SetGamma(val, val, val); #endif |