diff options
author | Lars Skovlund | 2013-01-14 20:11:34 +0100 |
---|---|---|
committer | Lars Skovlund | 2013-01-14 20:11:34 +0100 |
commit | 8e733f03b766bb741b3b87842607ba11c3652496 (patch) | |
tree | ef9c9056274536dc1ad8fea76ad3c38e38d5f640 /engines | |
parent | bef9a965d5aff4393b6640994e6cf27e343c10ee (diff) | |
download | scummvm-rg350-8e733f03b766bb741b3b87842607ba11c3652496.tar.gz scummvm-rg350-8e733f03b766bb741b3b87842607ba11c3652496.tar.bz2 scummvm-rg350-8e733f03b766bb741b3b87842607ba11c3652496.zip |
SCI: Event handling: Include modifier flags in null events.
Fixes bug #3580473
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/event.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp index 14443db1e2..90351a4d5e 100644 --- a/engines/sci/event.cpp +++ b/engines/sci/event.cpp @@ -161,8 +161,15 @@ SciEvent EventManager::getScummVMEvent() { noEvent.mousePos = input.mousePos = mousePos; if (!found || ev.type == Common::EVENT_MOUSEMOVE) - return noEvent; + { + int modifiers = em->getModifierState(); + noEvent.modifiers = + ((modifiers & Common::KBD_ALT) ? SCI_KEYMOD_ALT : 0) | + ((modifiers & Common::KBD_CTRL) ? SCI_KEYMOD_CTRL : 0) | + ((modifiers & Common::KBD_SHIFT) ? SCI_KEYMOD_LSHIFT | SCI_KEYMOD_RSHIFT : 0); + return noEvent; + } if (ev.type == Common::EVENT_QUIT) { input.type = SCI_EVENT_QUIT; return input; |