1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Android: Fix pressed buttons not beeing cleared on opening menu

This commit is contained in:
Sapier 2015-12-17 20:43:25 +01:00
parent 9eee3c3f46
commit 6a7e1667f6
3 changed files with 78 additions and 53 deletions

View file

@ -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)