diff options
| author | daoge <3523206925@qq.com> | 2026-03-03 07:20:55 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-03 06:20:55 +0700 |
| commit | 7eb4c7848894bfa757abfcf946173c0d36d0a64b (patch) | |
| tree | 94efa137b1d3d077555d1d55e80a8d628d6fe004 | |
| parent | 13c8bafad57bd081a3e87eb7e67a3a0d98734706 (diff) | |
fix: fix gamma (#191)
| -rw-r--r-- | Minecraft.Client/Common/Consoles_App.cpp | 4 | ||||
| -rw-r--r-- | Minecraft.Client/GameRenderer.cpp | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Minecraft.Client/Common/Consoles_App.cpp b/Minecraft.Client/Common/Consoles_App.cpp index 30bc8533..38397814 100644 --- a/Minecraft.Client/Common/Consoles_App.cpp +++ b/Minecraft.Client/Common/Consoles_App.cpp @@ -1342,9 +1342,13 @@ void CMinecraftApp::ActionGameSettings(int iPad,eGameSetting eVal) case eGameSetting_Gamma: 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 float fVal=((float)GameSettingsA[iPad]->ucGamma)*327.68f; RenderManager.UpdateGamma((unsigned short)fVal); +#endif } break; diff --git a/Minecraft.Client/GameRenderer.cpp b/Minecraft.Client/GameRenderer.cpp index 5e52459c..08c20cfb 100644 --- a/Minecraft.Client/GameRenderer.cpp +++ b/Minecraft.Client/GameRenderer.cpp @@ -903,7 +903,7 @@ void GameRenderer::updateLightTexture(float a) if (_g > 1) _g = 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 ig = 1 - _g; |
