mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Don't enable relative mouse mode if in touchscreen mode (#14118)
This commit is contained in:
parent
59abf1bb42
commit
b12be0498e
2 changed files with 23 additions and 23 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue