overlays: fix missing sound autorepeat fence.

The other instances aren't realistically autorepeating
This commit is contained in:
Megamouse 2023-05-24 23:48:16 +02:00
parent f031cd9b42
commit 96f1f9e45e
1 changed files with 5 additions and 1 deletions

View File

@ -156,8 +156,12 @@ namespace rsx
if (const usz index = static_cast<usz>(get_selected_index()); index < m_callbacks.size())
{
if (const std::function<page_navigation(pad_button)>& func = ::at32(m_callbacks, index))
{
// Play a sound unless this is a fast auto repeat which would induce a nasty noise
if (!is_auto_repeat || auto_repeat_interval_ms >= user_interface::m_auto_repeat_ms_interval_default)
{
Emu.GetCallbacks().play_sound(fs::get_config_dir() + "sounds/snd_decide.wav");
}
return func(button_press);
}
}