diff options
-rw-r--r-- | engines/hdb/input.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/engines/hdb/input.cpp b/engines/hdb/input.cpp index 9762910c33..212b23967d 100644 --- a/engines/hdb/input.cpp +++ b/engines/hdb/input.cpp @@ -209,7 +209,6 @@ void Input::stylusMove(int x, int y) { warning("STUB: stylusMove: Menu::processInput() required"); break; default: - debug(9, "stylusMove: Unintended GameState"); break; } } @@ -284,10 +283,23 @@ void Input::updateMouseButtons(int l, int m, int r) { void Input::updateKeys(Common::Event event, bool keyDown) { debug(9, "STUB: updateKeys: Check for Quit key"); - debug(9, "STUB: updateKeys: Check for Pause key"); uint16 buttons = getButtons(); + // PAUSE key pressed? + { + static int current = 0, last = 0; + last = current; + if (keyDown && event.kbd.keycode == Common::KEYCODE_p && g_hdb->getGameState() == GAME_PLAY) { + current = 1; + if (!last) { + g_hdb->togglePause(); + g_hdb->_sound->playSound(SND_POP); + } + } else + current = 0; + } + if (!g_hdb->getPause()) { if (event.kbd.keycode == _keyUp) { if (keyDown) { |