diff options
author | Muhammad Rifqi Priyo Susanto <muhammadrifqipriyosusanto@gmail.com> | 2022-11-30 22:50:06 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-30 10:50:06 -0500 |
commit | 281f9a9f88a8da7685c80ecbaf64991561522f3e (patch) | |
tree | b581a8a1bcdfefa6988483f36043d214c035350e /src | |
parent | 055fc69c1115a2f5b3edc50d42261aacbf2cbc4b (diff) | |
download | minetest-281f9a9f88a8da7685c80ecbaf64991561522f3e.tar.xz |
Android: Segmentation fault fix, PendingIntent flag, and other fixes (#12960)
* Android: Segmentation fault fix, PendingIntent flag, and other fixes
- Information about the crosshair is sent after camera initialization.
- Since API 31, PendingIntent requires mutability flag.
- super (class) is called in onRequestPermissionsResult().
- GameActivity suppresses "unused" warning since most of its methods are called from native code.
- Non-null safety is added for nullable function calls.
- Warning/error logging is added for various function calls' return value.
* Move utility functions into Utils.java
- Some nullable functions are changed to be non-null functions.
- Some null checking outside it is removed.
- More annotations are added to functions and parameters.
Diffstat (limited to 'src')
-rw-r--r-- | src/client/game.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp index 179557cf5..e180c88b2 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -1421,7 +1421,6 @@ bool Game::createClient(const GameStartData &start_data) if (g_touchscreengui) { g_touchscreengui->init(texture_src); g_touchscreengui->hide(); - g_touchscreengui->setUseCrosshair(!isNoCrosshairAllowed()); } #endif if (!connectToServer(start_data, &could_connect, &connect_aborted)) @@ -1458,6 +1457,11 @@ bool Game::createClient(const GameStartData &start_data) if (client->modsLoaded()) client->getScript()->on_camera_ready(camera); client->setCamera(camera); +#ifdef HAVE_TOUCHSCREENGUI + if (g_touchscreengui) { + g_touchscreengui->setUseCrosshair(!isNoCrosshairAllowed()); + } +#endif /* Clouds */ |