From dbe8ef1fb7f47c2e6c6fd993cba7802f041db519 Mon Sep 17 00:00:00 2001 From: Onaterdem Date: Mon, 3 Mar 2025 02:17:01 +0300 Subject: [PATCH] Fix slider fastIncrement conditions --- UnleashedRecomp/ui/options_menu.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/UnleashedRecomp/ui/options_menu.cpp b/UnleashedRecomp/ui/options_menu.cpp index 87134ddc..20b83e50 100644 --- a/UnleashedRecomp/ui/options_menu.cpp +++ b/UnleashedRecomp/ui/options_menu.cpp @@ -1051,14 +1051,12 @@ static void DrawConfigOption(int32_t rowIndex, float yOffset, ConfigDef* conf { float deltaTime = ImGui::GetIO().DeltaTime; - bool fastIncrement = (time - g_lastTappedTime) > 0.5; + bool fastIncrement = isSlider && (leftIsHeld || rightIsHeld) && (time - g_lastTappedTime) > 0.5; bool isPlayIncrementSound = true; constexpr double INCREMENT_TIME = 1.0 / 120.0; constexpr double INCREMENT_SOUND_TIME = 1.0 / 7.5; - if (isSlider) - { if (fastIncrement) { isPlayIncrementSound = (time - g_lastIncrementSoundTime) > INCREMENT_SOUND_TIME; @@ -1074,7 +1072,6 @@ static void DrawConfigOption(int32_t rowIndex, float yOffset, ConfigDef* conf decrement = leftIsHeld; increment = rightIsHeld; } - } do {