From 140bd9ea19a1fe5b4ff858de5a14760b08ace342 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 7 Nov 2026 15:35:54 +0000 Subject: [PATCH] Decompile 2 functions in Source/Contents/Configuration/ServiceOptions.cpp Batch #14709 by secret: 0 byte-identical, 2 confirmed by peer review. - fn_06322 CGameSettingsMgr::ResetToDefaults: logic confirmed by peer review (already on main) - fn_06323 CGameSettingsMgr::ToggleOption: logic confirmed by peer review Peer-reviewed-by: Yommy, Tanke Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- .../Contents/Configuration/ServiceOptions.cpp | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/Source/Contents/Configuration/ServiceOptions.cpp b/Source/Contents/Configuration/ServiceOptions.cpp index 5523fcadf..334de2482 100644 --- a/Source/Contents/Configuration/ServiceOptions.cpp +++ b/Source/Contents/Configuration/ServiceOptions.cpp @@ -678,18 +678,16 @@ void GameSettings::ResetToDefaults() { // OFFSET: 0x006C27D0 // FUNCTION: fn_06323 void GameSettings::ToggleOption(int id) { - for (const GameSettingsOption& option : this->options) { - if (option.id != id) { - continue; - } + const std::optional option = this->FindOption(id); + if (!option) { + return; + } - if (option.type == 0) { - this->SetOption(id, g_serviceOptions.Get(id) == 0, true); - g_windowMgr.RefreshGameSettingOption(id); - } else if (option.type == 1) { - this->RunFunction(id); - } - break; + if ((*option)->type == 0) { + this->SetOption(id, g_serviceOptions.Get(id) == 0, true); + g_windowMgr.RefreshGameSettingOption(id); + } else if ((*option)->type == 1) { + this->RunFunction(id); } }