diff options
-rw-r--r-- | engines/sherlock/scalpel/darts.cpp | 8 | ||||
-rw-r--r-- | engines/sherlock/scalpel/darts.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/engines/sherlock/scalpel/darts.cpp b/engines/sherlock/scalpel/darts.cpp index a24af4e444..8b5d02fb9c 100644 --- a/engines/sherlock/scalpel/darts.cpp +++ b/engines/sherlock/scalpel/darts.cpp @@ -422,16 +422,16 @@ int Darts::doPowerBar(const Common::Point &pt, byte color, int goToPower, bool i return MIN(idx * 100 / DARTBARSIZE, 100); } -bool Darts::dartHit() { +int Darts::dartHit() { Events &events = *_vm->_events; // Process pending events events.pollEventsAndWait(); if (events.kbHit()) { - // Key was pressed, so discard it and return true - events.clearKeyboard(); - return true; + // Key was pressed, so return it + Common::KeyState keyState = events.getKey(); + return keyState.keycode; } _oldDartButtons = events._pressed; diff --git a/engines/sherlock/scalpel/darts.h b/engines/sherlock/scalpel/darts.h index 4368954814..bf327b61a2 100644 --- a/engines/sherlock/scalpel/darts.h +++ b/engines/sherlock/scalpel/darts.h @@ -97,7 +97,7 @@ private: /** * Returns true if a mouse button or key is pressed. */ - bool dartHit(); + int dartHit(); /** * Return the score of the given location on the dart-board |