mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
TouchControls: Fix setUseCrosshair not being called (#15100)
This commit is contained in:
@@ -1510,10 +1510,6 @@ bool Game::createClient(const GameStartData &start_data)
|
|||||||
client->getScript()->on_camera_ready(camera);
|
client->getScript()->on_camera_ready(camera);
|
||||||
client->setCamera(camera);
|
client->setCamera(camera);
|
||||||
|
|
||||||
if (g_touchcontrols) {
|
|
||||||
g_touchcontrols->setUseCrosshair(!isTouchCrosshairDisabled());
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Clouds
|
/* Clouds
|
||||||
*/
|
*/
|
||||||
if (m_cache_enable_clouds)
|
if (m_cache_enable_clouds)
|
||||||
@@ -1578,8 +1574,10 @@ bool Game::initGui()
|
|||||||
gui_chat_console = new GUIChatConsole(guienv, guienv->getRootGUIElement(),
|
gui_chat_console = new GUIChatConsole(guienv, guienv->getRootGUIElement(),
|
||||||
-1, chat_backend, client, &g_menumgr);
|
-1, chat_backend, client, &g_menumgr);
|
||||||
|
|
||||||
if (g_settings->getBool("touch_controls"))
|
if (g_settings->getBool("touch_controls")) {
|
||||||
g_touchcontrols = new TouchControls(device, texture_src);
|
g_touchcontrols = new TouchControls(device, texture_src);
|
||||||
|
g_touchcontrols->setUseCrosshair(!isTouchCrosshairDisabled());
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user