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:
@@ -110,17 +110,10 @@ TFB_ReInitGraphics (int driver, int flags, int width, int height)
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
bool
|
||||
TFB_SetGamma (float gamma)
|
||||
{
|
||||
if (SDL_SetGamma (gamma, gamma, gamma) == -1)
|
||||
{
|
||||
log_add (log_Warning, "Unable to set gamma correction.");
|
||||
}
|
||||
else
|
||||
{
|
||||
log_add (log_Info, "Gamma correction set to %1.4f.", gamma);
|
||||
}
|
||||
return (SDL_SetGamma (gamma, gamma, gamma) == 0);
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
@@ -94,6 +94,7 @@ void
|
||||
TFB_SetGamma (float gamma)
|
||||
{
|
||||
log_add (log_Warning, "Custom gamma correction is not available in the SDL2 engine.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
Reference in New Issue
Block a user