aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sherlock/events.cpp2
-rw-r--r--engines/sherlock/tattoo/tattoo_darts.cpp10
2 files changed, 10 insertions, 2 deletions
diff --git a/engines/sherlock/events.cpp b/engines/sherlock/events.cpp
index 204db8bd15..758ba12b6a 100644
--- a/engines/sherlock/events.cpp
+++ b/engines/sherlock/events.cpp
@@ -325,7 +325,7 @@ bool Events::delay(uint32 time, bool interruptable) {
while (!_vm->shouldQuit() && g_system->getMillis() < delayEnd) {
pollEventsAndWait();
- if (interruptable && (kbHit() || _pressed)) {
+ if (interruptable && (kbHit() || _mouseButtons)) {
clearEvents();
return false;
}
diff --git a/engines/sherlock/tattoo/tattoo_darts.cpp b/engines/sherlock/tattoo/tattoo_darts.cpp
index 844697a518..cb4b52b01a 100644
--- a/engines/sherlock/tattoo/tattoo_darts.cpp
+++ b/engines/sherlock/tattoo/tattoo_darts.cpp
@@ -126,6 +126,7 @@ void Darts::playDarts(GameType gameType) {
// it entirely if you don't want to play all the way through it
if (_escapePressed) {
gameOver = true;
+ done = true;
playerNum = 0;
}
@@ -219,7 +220,7 @@ void Darts::playDarts(GameType gameType) {
if ((playerNum == 0 && _compPlay == 1) || _compPlay == 0 || done) {
if (_escapePressed) {
done = true;
- idx = 10;
+ break;
}
} else {
events.wait(20);
@@ -241,6 +242,13 @@ void Darts::playDarts(GameType gameType) {
}
}
+ // Wait for a keypress
+ do {
+ events.pollEventsAndWait();
+ events.setButtonState();
+ } while (!_vm->shouldQuit() && !events.kbHit() && !events._pressed);
+ events.clearEvents();
+
closeDarts();
screen.fadeToBlack();
screen.setFont(oldFontType);