From 695894013154d9dd3dcf916c7f089f8b09b7c6d6 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 15 Jun 2013 16:15:45 +0200 Subject: [PATCH] Ignore repeated keystrokes, except for text input events --- extern/sdl4ogre/sdlinputwrapper.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extern/sdl4ogre/sdlinputwrapper.cpp b/extern/sdl4ogre/sdlinputwrapper.cpp index bd8aa75db7..fcd393dfaf 100644 --- a/extern/sdl4ogre/sdlinputwrapper.cpp +++ b/extern/sdl4ogre/sdlinputwrapper.cpp @@ -123,10 +123,12 @@ namespace SFO mMouseListener->mouseReleased(evt.button, evt.button.button); break; case SDL_KEYDOWN: - _handleKeyPress(evt.key); + if (!evt.key.repeat) + _handleKeyPress(evt.key); break; case SDL_KEYUP: - mKeyboardListener->keyReleased(evt.key); + if (!evt.key.repeat) + mKeyboardListener->keyReleased(evt.key); break; case SDL_WINDOWEVENT: handleWindowEvent(evt);