diff options
author | Paul Gilbert | 2014-11-27 16:56:03 -0500 |
---|---|---|
committer | Paul Gilbert | 2014-12-12 22:48:53 -0500 |
commit | bb93268ee21a216162ef077c64462e0ac360df0a (patch) | |
tree | 086244534e8efa974ea00c759542c7ed2e93dfe5 /engines/access | |
parent | f0f19dbea07be8593cdc50bcef671bf69a8bd731 (diff) | |
download | scummvm-rg350-bb93268ee21a216162ef077c64462e0ac360df0a.tar.gz scummvm-rg350-bb93268ee21a216162ef077c64462e0ac360df0a.tar.bz2 scummvm-rg350-bb93268ee21a216162ef077c64462e0ac360df0a.zip |
ACCESS: Fix left button flag beig stuck after saving & loading games
Diffstat (limited to 'engines/access')
-rw-r--r-- | engines/access/access.cpp | 1 | ||||
-rw-r--r-- | engines/access/events.cpp | 5 | ||||
-rw-r--r-- | engines/access/events.h | 2 | ||||
-rw-r--r-- | engines/access/room.cpp | 1 |
4 files changed, 9 insertions, 0 deletions
diff --git a/engines/access/access.cpp b/engines/access/access.cpp index 4d326acff6..82c405c48e 100644 --- a/engines/access/access.cpp +++ b/engines/access/access.cpp @@ -491,6 +491,7 @@ Common::Error AccessEngine::loadGameState(int slot) { // Set extra post-load state _room->_function = 1; _timers._timersSavedFlag = false; + _events->clearEvents(); return Common::kNoError; } diff --git a/engines/access/events.cpp b/engines/access/events.cpp index d911e666ea..327fb06dd1 100644 --- a/engines/access/events.cpp +++ b/engines/access/events.cpp @@ -236,6 +236,11 @@ void EventsManager::debounceLeft() { } } +void EventsManager::clearEvents() { + _leftButton = _rightButton = false; + _keypresses.clear(); +} + void EventsManager::waitKeyMouse() { while (!_vm->shouldQuit() && !_leftButton && _keypresses.size() == 0) { pollEvents(); diff --git a/engines/access/events.h b/engines/access/events.h index 0a2a541de9..c72f245412 100644 --- a/engines/access/events.h +++ b/engines/access/events.h @@ -117,6 +117,8 @@ public: void debounceLeft(); + void clearEvents(); + void waitKeyMouse(); bool checkForNextFrameCounter(); diff --git a/engines/access/room.cpp b/engines/access/room.cpp index 57a5c4a88e..9251db4af4 100644 --- a/engines/access/room.cpp +++ b/engines/access/room.cpp @@ -494,6 +494,7 @@ void Room::handleCommand(int commandId) { --commandId; if (commandId == 9) { + _vm->_events->debounceLeft(); _vm->_canSaveLoad = true; _vm->openMainMenuDialog(); _vm->_canSaveLoad = false; |