mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
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.
This commit is contained in:
parent
055fc69c11
commit
281f9a9f88
5 changed files with 47 additions and 24 deletions
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue