Skip to content

Commit

Permalink
Fix bug with status bar not showing at low resolutions on emu launch
Browse files Browse the repository at this point in the history
  • Loading branch information
nim-ka committed Nov 26, 2024
1 parent cd4cb7f commit d1e533e
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions view/gui/features/Statusbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int32_t> parts)
{
auto parts = emu_launched ? emu_parts : idle_parts;

RECT rect{};
GetClientRect(g_main_hwnd, &rect);

Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -154,7 +149,7 @@ namespace Statusbar

void on_size_changed(std::any)
{
update_size();
update_size(emu_launched ? emu_parts : idle_parts);
}

void init()
Expand Down

0 comments on commit d1e533e

Please sign in to comment.