Forgot to also take into account changing UI scale.

This commit is contained in:
MaikelChan 2021-10-24 15:40:21 +02:00
parent f46f1f5365
commit b3b63d95ee
No known key found for this signature in database
GPG Key ID: B2CE398C279239EC
1 changed files with 3 additions and 2 deletions

View File

@ -342,10 +342,11 @@ void winmain::RenderUi()
if (ImGui::BeginMainMenuBar())
{
if (MainMenuHeight == 0)
int currentMenuHeight = static_cast<int>(ImGui::GetWindowSize().y);
if (MainMenuHeight != currentMenuHeight)
{
// Get the height of the main menu bar and update screen coordinates
MainMenuHeight = static_cast<int>(ImGui::GetWindowSize().y);
MainMenuHeight = currentMenuHeight;
fullscrn::window_size_changed();
}