Skip to content

Commit

Permalink
Added an option to disable gamma boost
Browse files Browse the repository at this point in the history
  • Loading branch information
KiritoDv committed Jan 16, 2025
1 parent d283976 commit f0a0773
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/port/Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/port/ui/ImguiUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f0a0773

Please sign in to comment.