mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-17 22:25:37 +00:00
Frontend: Ignore key repeat events for controller/speed limit
This commit is contained in:
parent
2b419fcb08
commit
d1be9460b9
|
@ -546,7 +546,8 @@ void SDLInterface::HandleSDLEvent(const SDL_Event* event)
|
||||||
|
|
||||||
void SDLInterface::HandleSDLKeyEvent(const SDL_Event* event)
|
void SDLInterface::HandleSDLKeyEvent(const SDL_Event* event)
|
||||||
{
|
{
|
||||||
if (m_controller && HandleSDLKeyEventForController(event, m_controller.get()))
|
const bool repeat = event->key.repeat != 0;
|
||||||
|
if (!repeat && m_controller && HandleSDLKeyEventForController(event, m_controller.get()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const bool pressed = (event->type == SDL_KEYDOWN);
|
const bool pressed = (event->type == SDL_KEYDOWN);
|
||||||
|
@ -574,8 +575,11 @@ void SDLInterface::HandleSDLKeyEvent(const SDL_Event* event)
|
||||||
|
|
||||||
case SDL_SCANCODE_TAB:
|
case SDL_SCANCODE_TAB:
|
||||||
{
|
{
|
||||||
m_speed_limiter_temp_disabled = pressed;
|
if (!repeat)
|
||||||
UpdateAudioVisualSync();
|
{
|
||||||
|
m_speed_limiter_temp_disabled = pressed;
|
||||||
|
UpdateAudioVisualSync();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue