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:
parent
9eee3c3f46
commit
6a7e1667f6
3 changed files with 78 additions and 53 deletions
17
src/game.cpp
17
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue