diff options
author | Sapier <sapier AT gmx dot net> | 2015-12-17 20:43:25 +0100 |
---|---|---|
committer | Sapier <sapier AT gmx dot net> | 2015-12-17 20:43:25 +0100 |
commit | 6a7e1667f6e696f152191d9fdd74947ceefcfd3a (patch) | |
tree | e2e37c83233172def6f182ce8179c66803458d34 /src/game.cpp | |
parent | 9eee3c3f465c071bb9908749cf48be3c131a1bdf (diff) | |
download | dragonfireclient-6a7e1667f6e696f152191d9fdd74947ceefcfd3a.tar.xz |
Android: Fix pressed buttons not beeing cleared on opening menu
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/game.cpp b/src/game.cpp index 5e4f4cacf..f6d59e4e3 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -2569,7 +2569,17 @@ void Game::processUserInput(VolatileRunFlags *flags, || noMenuActive() == false || guienv->hasFocus(gui_chat_console)) { input->clear(); +#ifdef HAVE_TOUCHSCREENGUI + g_touchscreengui->Hide(); +#endif } +#ifdef HAVE_TOUCHSCREENGUI + else if (g_touchscreengui) { + /* on touchscreengui step may generate own input events which ain't + * what we want in case we just did clear them */ + g_touchscreengui->step(dtime); + } +#endif if (!guienv->hasFocus(gui_chat_console) && gui_chat_console->isOpen()) { gui_chat_console->closeConsoleAtOnce(); @@ -2578,13 +2588,6 @@ void Game::processUserInput(VolatileRunFlags *flags, // Input handler step() (used by the random input generator) input->step(dtime); -#ifdef HAVE_TOUCHSCREENGUI - - if (g_touchscreengui) { - g_touchscreengui->step(dtime); - } - -#endif #ifdef __ANDROID__ if (current_formspec != 0) |