Fix missing initialization for m_game_focused

This commit is contained in:
sfan5 2023-09-22 21:32:04 +02:00
parent d113636a43
commit b0d5cedeb6
1 changed files with 2 additions and 2 deletions

View File

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