From 4c4918b1545c8e53c671ac23529776767a1e343b Mon Sep 17 00:00:00 2001 From: DS Date: Sun, 5 Jan 2025 13:20:21 +0100 Subject: [PATCH] Fix show_debug setting causing inconsistency between debug control and shown debug info --- src/client/game.cpp | 4 ++++ src/client/gameui.cpp | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/client/game.cpp b/src/client/game.cpp index f04e265e9..b7fa7c471 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -896,6 +896,10 @@ bool Game::startup(bool *kill, runData.time_from_last_punch = 10.0; m_game_ui->initFlags(); + if (g_settings->getBool("show_debug")) { + m_flags.debug_state = 1; + m_game_ui->m_flags.show_minimal_debug = true; + } m_first_loop_after_window_activation = true; diff --git a/src/client/gameui.cpp b/src/client/gameui.cpp index 6fc7ac267..53fae50c0 100644 --- a/src/client/gameui.cpp +++ b/src/client/gameui.cpp @@ -215,7 +215,6 @@ void GameUI::update(const RunStats &stats, Client *client, MapDrawControl *draw_ void GameUI::initFlags() { m_flags = GameUI::Flags(); - m_flags.show_minimal_debug = g_settings->getBool("show_debug"); } void GameUI::showTranslatedStatusText(const char *str)