SCI: Fix backend events treated as keyboard events

Prevents backend events such as EVENT_SCREEN_CHANGED
from being misinterpreted as SCI keyboard events
This commit is contained in:
sluicebox 2019-06-04 12:18:17 -07:00 committed by Filippos Karapetis
parent 8b929a584f
commit a2cc90bf9b

View File

@ -253,6 +253,11 @@ SciEvent EventManager::getScummVMEvent() {
}
}
// Handle keyboard events for the rest of the function
if (ev.type != Common::EVENT_KEYDOWN && ev.type != Common::EVENT_KEYUP) {
return noEvent;
}
// Check for Control-Shift-D (debug console)
if (ev.type == Common::EVENT_KEYDOWN && ev.kbd.hasFlags(Common::KBD_CTRL | Common::KBD_SHIFT) && ev.kbd.keycode == Common::KEYCODE_d) {
// Open debug console