From b0d5cedeb6039f0a9dafbec0d7ac6e566049af35 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Fri, 22 Sep 2023 21:32:04 +0200 Subject: [PATCH] Fix missing initialization for m_game_focused --- src/client/game.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/game.cpp b/src/client/game.cpp index 75a29b131..f0192a918 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -972,7 +972,7 @@ private: bool m_first_loop_after_window_activation = false; bool m_camera_offset_changed = false; - bool m_game_focused; + bool m_game_focused = false; bool m_does_lost_focus_pause_game = false; @@ -1951,7 +1951,7 @@ void Game::processUserInput(f32 dtime) { // Reset input if window not active or some menu is active if (!device->isWindowActive() || isMenuActive() || guienv->hasFocus(gui_chat_console)) { - if(m_game_focused) { + if (m_game_focused) { m_game_focused = false; infostream << "Game lost focus" << std::endl; input->releaseAllKeys();