From d1e533e75784c99a25a042bcd71bedf0bbbb7c0b Mon Sep 17 00:00:00 2001 From: nim-ka Date: Tue, 26 Nov 2024 15:54:28 -0800 Subject: [PATCH] Fix bug with status bar not showing at low resolutions on emu launch --- view/gui/features/Statusbar.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/view/gui/features/Statusbar.cpp b/view/gui/features/Statusbar.cpp index 2341a4bd..c4ca4ad9 100644 --- a/view/gui/features/Statusbar.cpp +++ b/view/gui/features/Statusbar.cpp @@ -32,10 +32,8 @@ namespace Statusbar SendMessage(statusbar_hwnd, SB_SETTEXT, (int)section, (LPARAM)text.c_str()); } - void update_size() + void update_size(std::vector parts) { - auto parts = emu_launched ? emu_parts : idle_parts; - RECT rect{}; GetClientRect(g_main_hwnd, &rect); @@ -88,10 +86,7 @@ namespace Statusbar Messenger::broadcast(Messenger::Message::SlotChanged, (size_t)g_config.st_slot); } - if (!value && previous_value) - { - set_statusbar_parts(statusbar_hwnd, value ? emu_parts : idle_parts); - } + update_size(value ? emu_parts : idle_parts); previous_value = value; } @@ -154,7 +149,7 @@ namespace Statusbar void on_size_changed(std::any) { - update_size(); + update_size(emu_launched ? emu_parts : idle_parts); } void init()