From 418d0f8e6c4431468a5c52447afe09c613462594 Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Tue, 17 Jan 2023 17:57:02 -0500 Subject: [PATCH] fix: default cvar values before applying presets (#2357) --- soh/soh/Enhancements/presets.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/soh/soh/Enhancements/presets.cpp b/soh/soh/Enhancements/presets.cpp index 91d5c323a..aa8558caa 100644 --- a/soh/soh/Enhancements/presets.cpp +++ b/soh/soh/Enhancements/presets.cpp @@ -55,9 +55,8 @@ void DrawPresetSelector(PresetType presetTypeId) { ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(6.0f, 4.0f)); if (ImGui::Button(("Apply Preset##" + presetTypeCvar).c_str())) { - if (selectedPresetId == 0) { - clearCvars(presetTypeDef.cvarsToClear); - } else { + clearCvars(presetTypeDef.cvarsToClear); + if (selectedPresetId != 0) { applyPreset(selectedPresetDef.entries); } SohImGui::RequestCvarSaveOnNextTick();