Fix: gamemode and difficulty slider sounds in host/player options

Only play the sound when the slider value actually changes instead of on any slight movement.
This commit is contained in:
Lord_Cambion committed 2026-11-30 15:00:48 +01:00
1 parent 1bb3700184
commit 82091c2f39
2 files changed
+19 -7

No files matched your search

@@ -422,9 +422,13 @@ void UIScene_InGamePlayerOptionsMenu::handleSliderMove(F64 sliderId, F64 current
m_multiList.handleSliderMove(id, value);
if (id == eControl_GameMode)
{
if (m_bInitialPopulateDone) ui.PlayUISFX(eSFX_Scroll);
m_bPendingSliderUpdate = true;
m_iPendingSliderValue = value;
int prevValue = m_bPendingSliderUpdate ? m_iPendingSliderValue : m_iGameType;
if (value != prevValue)
{
if (m_bInitialPopulateDone) ui.PlayUISFX(eSFX_Scroll);
m_bPendingSliderUpdate = true;
m_iPendingSliderValue = value;
}
}
}