fix: fix gamma (#191)
This commit is contained in:
@@ -1342,9 +1342,13 @@ void CMinecraftApp::ActionGameSettings(int iPad,eGameSetting eVal)
|
|||||||
case eGameSetting_Gamma:
|
case eGameSetting_Gamma:
|
||||||
if(iPad==ProfileManager.GetPrimaryPad())
|
if(iPad==ProfileManager.GetPrimaryPad())
|
||||||
{
|
{
|
||||||
|
#if defined(_WIN64) || defined(_WINDOWS64)
|
||||||
|
pMinecraft->options->set(Options::Option::GAMMA, ((float)GameSettingsA[iPad]->ucGamma) / 100.0f);
|
||||||
|
#else
|
||||||
// ucGamma range is 0-100, UpdateGamma is 0 - 32768
|
// ucGamma range is 0-100, UpdateGamma is 0 - 32768
|
||||||
float fVal=((float)GameSettingsA[iPad]->ucGamma)*327.68f;
|
float fVal=((float)GameSettingsA[iPad]->ucGamma)*327.68f;
|
||||||
RenderManager.UpdateGamma((unsigned short)fVal);
|
RenderManager.UpdateGamma((unsigned short)fVal);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -903,7 +903,7 @@ void GameRenderer::updateLightTexture(float a)
|
|||||||
if (_g > 1) _g = 1;
|
if (_g > 1) _g = 1;
|
||||||
if (_b > 1) _b = 1;
|
if (_b > 1) _b = 1;
|
||||||
|
|
||||||
float brightness = 0.0f; // 4J - TODO - was mc->options->gamma;
|
float brightness = mc->options->gamma;
|
||||||
|
|
||||||
float ir = 1 - _r;
|
float ir = 1 - _r;
|
||||||
float ig = 1 - _g;
|
float ig = 1 - _g;
|
||||||
|
|||||||
Reference in New Issue
Block a user