aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstujones11 <stujones111@gmail.com>2019-04-19 11:06:47 +0100
committerLoïc Blot <nerzhul@users.noreply.github.com>2019-04-19 12:06:47 +0200
commitcff1e9ca273be6d0719f18ac72622f7b7f7dbdb0 (patch)
tree144ec6ad7f62734ff5b5cac404748fd32df40d5d
parent38b94f248ad2473b8c49e9832215071e8a79944f (diff)
downloadminetest-cff1e9ca273be6d0719f18ac72622f7b7f7dbdb0.tar.gz
minetest-cff1e9ca273be6d0719f18ac72622f7b7f7dbdb0.tar.bz2
minetest-cff1e9ca273be6d0719f18ac72622f7b7f7dbdb0.zip
Android: Clear chat open flag on cancel or completion (#8478)
-rw-r--r--src/client/game.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp
index 192c899d9..379f32949 100644
--- a/src/client/game.cpp
+++ b/src/client/game.cpp
@@ -1880,6 +1880,9 @@ void Game::processKeyInput()
} else if (wasKeyDown(KeyType::INVENTORY)) {
openInventory();
} else if (input->cancelPressed()) {
+#ifdef __ANDROID__
+ m_android_chat_open = false;
+#endif
if (!gui_chat_console->isOpenInhibited()) {
showPauseMenu();
}
@@ -2079,6 +2082,7 @@ void Game::handleAndroidChatInput()
if (m_android_chat_open && porting::getInputDialogState() == 0) {
std::string text = porting::getInputDialogValue();
client->typeChatMessage(utf8_to_wide(text));
+ m_android_chat_open = false;
}
}
#endif