diff options
| author | KiritoDv <kiritodev01@gmail.com> | 2025-01-16 11:28:47 -0600 |
|---|---|---|
| committer | KiritoDv <kiritodev01@gmail.com> | 2025-01-16 11:28:47 -0600 |
| commit | f0a0773a1c0ae620bfe40bca28c49359b3ee11bd (patch) | |
| tree | 23ec87984d0fc9d924f456edb8a734d5380af7dc | |
| parent | d2839767da439d17dcf43d42906b4e3855952a95 (diff) | |
Added an option to disable gamma boost
| -rw-r--r-- | src/port/Engine.cpp | 6 | ||||
| -rw-r--r-- | src/port/ui/ImguiUI.cpp | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/port/Engine.cpp b/src/port/Engine.cpp index f06eb4c8..8fa33ccf 100644 --- a/src/port/Engine.cpp +++ b/src/port/Engine.cpp @@ -47,6 +47,7 @@ namespace fs = std::filesystem; extern "C" { bool prevAltAssets = false; +bool gEnableGammaBoost = true; #include <sf64thread.h> #include <macros.h> #include "sf64audio_provisional.h" @@ -214,6 +215,7 @@ GameEngine::GameEngine() { "SoundFont", static_cast<uint32_t>(SF64::ResourceType::SoundFont), 0); prevAltAssets = CVarGetInteger("gEnhancements.Mods.AlternateAssets", 0); + gEnableGammaBoost = CVarGetInteger("gGraphics.GammaMode", 1) == 1; context->GetResourceManager()->SetAltAssetsEnabled(prevAltAssets); } @@ -405,7 +407,9 @@ void GameEngine::ProcessGfxCommands(Gfx* commands) { return; } - wnd->EnableSRGBMode(); + if(gEnableGammaBoost) { + wnd->EnableSRGBMode(); + } wnd->SetRendererUCode(UcodeHandlers::ucode_f3dex); std::vector<std::unordered_map<Mtx*, MtxF>> mtx_replacements; diff --git a/src/port/ui/ImguiUI.cpp b/src/port/ui/ImguiUI.cpp index b858cf47..b2330021 100644 --- a/src/port/ui/ImguiUI.cpp +++ b/src/port/ui/ImguiUI.cpp @@ -376,10 +376,10 @@ void DrawSettingsMenu(){ } UIWidgets::PaddedEnhancementCheckbox("Enable Alternative Assets", "gEnhancements.Mods.AlternateAssets"); + UIWidgets::EnhancementCheckbox("Enable Gamma Boost (Needs reload)", "gGraphics.GammaMode", false, "Gamma Boost is disabled in the current build of the game", UIWidgets::CheckboxGraphics::Cross, true); // If more filters are added to LUS, make sure to add them to the filters list here ImGui::Text("Texture Filter (Needs reload)"); - UIWidgets::EnhancementCombobox("gTextureFilter", filters, 0); UIWidgets::Spacer(0); |
