Frontend: Ignore key repeat events for controller/speed limit

This commit is contained in:
Connor McLaughlin 2019-10-27 21:36:40 +10:00
parent 2b419fcb08
commit d1be9460b9

View file

@ -546,7 +546,8 @@ void SDLInterface::HandleSDLEvent(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;
const bool pressed = (event->type == SDL_KEYDOWN);
@ -573,10 +574,13 @@ void SDLInterface::HandleSDLKeyEvent(const SDL_Event* event)
break;
case SDL_SCANCODE_TAB:
{
if (!repeat)
{
m_speed_limiter_temp_disabled = pressed;
UpdateAudioVisualSync();
}
}
break;
case SDL_SCANCODE_PAUSE: