mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 09:05:19 +02:00
Don't enable relative mouse mode if in touchscreen mode (#14118)
This commit is contained in:
@@ -542,13 +542,13 @@ void ClientLauncher::main_menu(MainMenuData *menudata)
|
||||
}
|
||||
infostream << "Waited for other menus" << std::endl;
|
||||
|
||||
#ifndef ANDROID
|
||||
// Cursor can be non-visible when coming from the game
|
||||
m_rendering_engine->get_raw_device()->getCursorControl()->setVisible(true);
|
||||
|
||||
// Set absolute mouse mode
|
||||
m_rendering_engine->get_raw_device()->getCursorControl()->setRelativeMode(false);
|
||||
#endif
|
||||
auto *cur_control = m_rendering_engine->get_raw_device()->getCursorControl();
|
||||
if (cur_control) {
|
||||
// Cursor can be non-visible when coming from the game
|
||||
cur_control->setVisible(true);
|
||||
// Set absolute mouse mode
|
||||
cur_control->setRelativeMode(false);
|
||||
}
|
||||
|
||||
/* show main menu */
|
||||
GUIEngine mymenu(&input->joystick, guiroot, m_rendering_engine, &g_menumgr, menudata, *kill);
|
||||
|
Reference in New Issue
Block a user