mirror of
https://github.com/luanti-org/luanti.git
synced 2026-04-17 08:37:33 +00:00
Restore mouse cursor before shutdown progress bar
This commit is contained in:
@@ -586,11 +586,10 @@ void ClientLauncher::main_menu(MainMenuData *menudata)
|
||||
framemarker.end();
|
||||
infostream << "Waited for other menus" << std::endl;
|
||||
|
||||
// Make sure normal mouse cursor is restored
|
||||
auto *cur_control = 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);
|
||||
}
|
||||
|
||||
|
||||
@@ -624,6 +624,13 @@ void Game::shutdown()
|
||||
if (g_touchcontrols)
|
||||
g_touchcontrols->hide();
|
||||
|
||||
// Restore normal mouse cursor
|
||||
auto *cur_control = device->getCursorControl();
|
||||
if (cur_control) {
|
||||
cur_control->setVisible(true);
|
||||
cur_control->setRelativeMode(false);
|
||||
}
|
||||
|
||||
clouds.reset();
|
||||
|
||||
gui_chat_console.reset();
|
||||
|
||||
Reference in New Issue
Block a user