move AltAssets to gSettings from gEnhancements (#5323)

This commit is contained in:
Christopher Leggett 2025-04-04 15:25:30 -04:00 committed by GitHub
parent 2589448057
commit ee23d02921
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -310,7 +310,7 @@ OTRGlobals::OTRGlobals() {
// tell LUS to reserve 3 SoH specific threads (Game, Audio, Save) // tell LUS to reserve 3 SoH specific threads (Game, Audio, Save)
context->InitResourceManager(OTRFiles, {}, 3); context->InitResourceManager(OTRFiles, {}, 3);
prevAltAssets = CVarGetInteger(CVAR_ENHANCEMENT("AltAssets"), 0); prevAltAssets = CVarGetInteger(CVAR_SETTING("AltAssets"), 0);
context->GetResourceManager()->SetAltAssetsEnabled(prevAltAssets); context->GetResourceManager()->SetAltAssetsEnabled(prevAltAssets);
auto controlDeck = std::make_shared<LUS::ControlDeck>(std::vector<CONTROLLERBUTTONS_T>({ auto controlDeck = std::make_shared<LUS::ControlDeck>(std::vector<CONTROLLERBUTTONS_T>({
@ -1428,7 +1428,7 @@ extern "C" void Graph_StartFrame() {
} }
#endif #endif
case KbScancode::LUS_KB_TAB: { case KbScancode::LUS_KB_TAB: {
CVarSetInteger(CVAR_ENHANCEMENT("AltAssets"), !CVarGetInteger(CVAR_ENHANCEMENT("AltAssets"), 0)); CVarSetInteger(CVAR_SETTING("AltAssets"), !CVarGetInteger(CVAR_SETTING("AltAssets"), 0));
break; break;
} }
} }
@ -1524,7 +1524,7 @@ extern "C" void Graph_ProcessGfxCommands(Gfx* commands) {
} }
} }
bool curAltAssets = CVarGetInteger(CVAR_ENHANCEMENT("AltAssets"), 0); bool curAltAssets = CVarGetInteger(CVAR_SETTING("AltAssets"), 0);
if (prevAltAssets != curAltAssets) { if (prevAltAssets != curAltAssets) {
prevAltAssets = curAltAssets; prevAltAssets = curAltAssets;
Ship::Context::GetInstance()->GetResourceManager()->SetAltAssetsEnabled(curAltAssets); Ship::Context::GetInstance()->GetResourceManager()->SetAltAssetsEnabled(curAltAssets);

View file

@ -429,7 +429,7 @@ void SohMenu::AddMenuEnhancements() {
AddWidget(path, "Mods", WIDGET_SEPARATOR_TEXT); AddWidget(path, "Mods", WIDGET_SEPARATOR_TEXT);
AddWidget(path, "Use Alternate Assets", WIDGET_CVAR_CHECKBOX) AddWidget(path, "Use Alternate Assets", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_ENHANCEMENT("AltAssets")) .CVar(CVAR_SETTING("AltAssets"))
.Options(CheckboxOptions().Tooltip( .Options(CheckboxOptions().Tooltip(
"Toggle between standard assets and alternate assets. Usually mods will indicate if " "Toggle between standard assets and alternate assets. Usually mods will indicate if "
"this setting has to be used or not.")); "this setting has to be used or not."));