From 39bf17aafef8a753fe7ff81282d401bd194e069f Mon Sep 17 00:00:00 2001 From: bicarus <202771338+bicarus-dev@users.noreply.github.com> Date: Tue, 21 Jul 2026 17:46:18 -0700 Subject: [PATCH] patcher: fix plus minus buttons for number patches (#825) ## Link to GitHub Issue or related Pull Request, if one exists Reported by a certain sea reptile ## Description of change Fix the + / - buttons for number patches not working. Regressed by one of the ImGui version updates. ## Testing seems fine now --- src/spice2x/overlay/windows/patch_manager.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/spice2x/overlay/windows/patch_manager.cpp b/src/spice2x/overlay/windows/patch_manager.cpp index ea505d5..c69b235 100644 --- a/src/spice2x/overlay/windows/patch_manager.cpp +++ b/src/spice2x/overlay/windows/patch_manager.cpp @@ -936,14 +936,17 @@ namespace overlay::windows { } else if (patch.type == patcher::PatchType::Integer) { set_patch_option_width(); auto& numpatch = patch.patch_number; - ImGui::InputInt("##int_input", &numpatch.value, 1, 10); - if (ImGui::IsItemDeactivatedAfterEdit()) { + const bool value_changed = ImGui::InputInt( + "##int_input", &numpatch.value, 1, 10); + if (value_changed || ImGui::IsItemDeactivatedAfterEdit()) { numpatch.value = CLAMP( numpatch.value, numpatch.min, numpatch.max); patcher::apply_patch(patch, true); + } + if (ImGui::IsItemDeactivated()) { patcher::config_dirty = true; } if (ImGui::IsItemHovered(ImGui::TOOLTIP_FLAGS)) {