diff options
author | Nipun Garg | 2019-07-12 00:08:12 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:17 +0200 |
commit | d5a779168f2110f4041f78d0f4d3dc5145d9b5ce (patch) | |
tree | b186aff4620968a9b7a50a9d9a65bfb73b3fe3c3 | |
parent | cf5863c7946e570f268280c383b23843b7e41e71 (diff) | |
download | scummvm-rg350-d5a779168f2110f4041f78d0f4d3dc5145d9b5ce.tar.gz scummvm-rg350-d5a779168f2110f4041f78d0f4d3dc5145d9b5ce.tar.bz2 scummvm-rg350-d5a779168f2110f4041f78d0f4d3dc5145d9b5ce.zip |
HDB: Add Pause Button
-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) { |