aboutsummaryrefslogtreecommitdiff
path: root/engines/access
diff options
context:
space:
mode:
Diffstat (limited to 'engines/access')
-rw-r--r--engines/access/access.cpp1
-rw-r--r--engines/access/events.cpp5
-rw-r--r--engines/access/events.h2
-rw-r--r--engines/access/room.cpp1
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;