Restore mouse cursor before shutdown progress bar

This commit is contained in:
sfan5
2026-03-28 20:43:35 +01:00
parent 724a154b4f
commit 588dfebb4b
2 changed files with 8 additions and 2 deletions
+1 -2
View File
@@ -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);
}
+7
View File
@@ -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();