diff --git a/SpaceCadetPinball/winmain.cpp b/SpaceCadetPinball/winmain.cpp index f113602..8c27c7d 100644 --- a/SpaceCadetPinball/winmain.cpp +++ b/SpaceCadetPinball/winmain.cpp @@ -342,10 +342,11 @@ void winmain::RenderUi() if (ImGui::BeginMainMenuBar()) { - if (MainMenuHeight == 0) + int currentMenuHeight = static_cast(ImGui::GetWindowSize().y); + if (MainMenuHeight != currentMenuHeight) { // Get the height of the main menu bar and update screen coordinates - MainMenuHeight = static_cast(ImGui::GetWindowSize().y); + MainMenuHeight = currentMenuHeight; fullscrn::window_size_changed(); }