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;
|
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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user