diff options
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) |