diff options
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp index 03febaff..e4b6e54d 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -792,6 +792,15 @@ void Game::handleInput() // Get the state of the keyboard keys keyboard.refreshActiveKeys(); + // Ignore input if either "ignore" key is pressed + // Stops the character moving about if the user's window manager + // uses "ignore+arrow key" to switch virtual desktops. + if (keyboard.isKeyActive(keyboard.KEY_IGNORE_INPUT_1) || + keyboard.isKeyActive(keyboard.KEY_IGNORE_INPUT_2)) + { + return; + } + const Uint16 x = player_node->mX; const Uint16 y = player_node->mY; unsigned char direction = 0; |