diff options
Diffstat (limited to 'engines/pegasus')
-rw-r--r-- | engines/pegasus/input.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/engines/pegasus/input.cpp b/engines/pegasus/input.cpp index f4834037d9..47ec44a736 100644 --- a/engines/pegasus/input.cpp +++ b/engines/pegasus/input.cpp @@ -26,6 +26,8 @@ #include "common/events.h" #include "common/system.h" +#include "gui/gui-manager.h" + #include "pegasus/cursor.h" #include "pegasus/input.h" #include "pegasus/pegasus.h" @@ -148,6 +150,7 @@ void InputDeviceManager::getInput(Input &input, const InputBits filter) { // Set the console to be requested or not input.setConsoleRequested(_consoleRequested); + _consoleRequested = false; // WORKAROUND: The original had this in currentBits, but then // pressing alt would count as an event (and mess up someone @@ -173,9 +176,14 @@ void InputDeviceManager::waitInput(const InputBits filter) { } bool InputDeviceManager::notifyEvent(const Common::Event &event) { + if (GUI::GuiManager::instance().isActive()) { + // For some reason, the engine hooks in the event system using an EventObserver. + // So we need to explicitly ignore events that happen while ScummVM's GUI is open. + return false; + } + // We're mapping from ScummVM events to pegasus events, which // are based on pippin events. - _consoleRequested = false; switch (event.type) { case Common::EVENT_KEYDOWN: |