Backfit commit 'c0bc500620' to SDL1/2:

"Added gamma correction option to the setup menu; bug #977; some work from Nic"
This commit is contained in:
Michael Martin
2020-04-03 18:27:40 -07:00
parent 562917b456
commit 9f193f123e
2 changed files with 3 additions and 9 deletions
+2 -9
View File
@@ -110,17 +110,10 @@ TFB_ReInitGraphics (int driver, int flags, int width, int height)
return result; return result;
} }
void bool
TFB_SetGamma (float gamma) TFB_SetGamma (float gamma)
{ {
if (SDL_SetGamma (gamma, gamma, gamma) == -1) return (SDL_SetGamma (gamma, gamma, gamma) == 0);
{
log_add (log_Warning, "Unable to set gamma correction.");
}
else
{
log_add (log_Info, "Gamma correction set to %1.4f.", gamma);
}
} }
int int
+1
View File
@@ -94,6 +94,7 @@ void
TFB_SetGamma (float gamma) TFB_SetGamma (float gamma)
{ {
log_add (log_Warning, "Custom gamma correction is not available in the SDL2 engine."); log_add (log_Warning, "Custom gamma correction is not available in the SDL2 engine.");
return 0;
} }
int int