aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorBastien Bouclet2017-11-24 19:37:58 +0100
committerGitHub2017-11-24 19:37:58 +0100
commit5ed745f5329a54d33f1b1551569cf9856990bea1 (patch)
treee444facb6330945c3ee03c6252b386dc8e70acad /gui
parentc5caf9825e0d02036795afa87f49b7aa274cc983 (diff)
parentacf87add2751ae68298f4d5b5480635d06b0ec5e (diff)
downloadscummvm-rg350-5ed745f5329a54d33f1b1551569cf9856990bea1.tar.gz
scummvm-rg350-5ed745f5329a54d33f1b1551569cf9856990bea1.tar.bz2
scummvm-rg350-5ed745f5329a54d33f1b1551569cf9856990bea1.zip
Merge pull request #1063 from bgK/keyboard-repeat
SDL2: Improve handling of keyboard repeat events
Diffstat (limited to 'gui')
-rw-r--r--gui/EventRecorder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/gui/EventRecorder.cpp b/gui/EventRecorder.cpp
index 3f91cfa259..f1b486d394 100644
--- a/gui/EventRecorder.cpp
+++ b/gui/EventRecorder.cpp
@@ -177,7 +177,7 @@ bool EventRecorder::processDelayMillis() {
}
void EventRecorder::checkForKeyCode(const Common::Event &event) {
- if ((event.type == Common::EVENT_KEYDOWN) && (event.kbd.flags & Common::KBD_CTRL) && (event.kbd.keycode == Common::KEYCODE_p) && (!event.synthetic)) {
+ if ((event.type == Common::EVENT_KEYDOWN) && (event.kbd.flags & Common::KBD_CTRL) && (event.kbd.keycode == Common::KEYCODE_p) && (!event.kbdRepeat)) {
togglePause();
}
}
@@ -445,7 +445,7 @@ Common::List<Common::Event> EventRecorder::mapEvent(const Common::Event &ev, Com
evt.mouse.y = evt.mouse.y * (g_system->getOverlayHeight() / g_system->getHeight());
switch (_recordMode) {
case kRecorderPlayback:
- if (ev.synthetic != true) {
+ if (ev.kbdRepeat != true) {
return Common::List<Common::Event>();
}
return Common::DefaultEventMapper::mapEvent(ev, source);