1
0
Fork 0
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:
grorp 2024-01-13 20:01:10 +01:00 committed by GitHub
parent 59abf1bb42
commit b12be0498e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 23 deletions

View file

@ -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);