Added an option to disable gamma boost

This commit is contained in:
KiritoDv 2025-01-16 11:28:47 -06:00
parent d2839767da
commit f0a0773a1c
2 changed files with 6 additions and 2 deletions

View File

@ -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;

View File

@ -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);