From 6e22d74eee99226b69a6427103693323502a9795 Mon Sep 17 00:00:00 2001 From: Ignacio Sanchez Gines <863613+drhelius@users.noreply.github.com> Date: Mon, 9 Dec 2024 00:01:42 +0100 Subject: [PATCH] Fix main window in multi viewport mode --- platforms/desktop-shared/gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/desktop-shared/gui.cpp b/platforms/desktop-shared/gui.cpp index b0ca666..844913f 100644 --- a/platforms/desktop-shared/gui.cpp +++ b/platforms/desktop-shared/gui.cpp @@ -1080,7 +1080,7 @@ static void main_window(void) int window_y = ((h - (h_corrected * scale_multiplier)) / 2) + (config_emulator.show_menu ? main_menu_height : 0); ImGui::SetNextWindowSize(ImVec2((float)main_window_width, (float)main_window_height)); - ImGui::SetNextWindowPos(ImVec2((float)window_x, (float)window_y)); + ImGui::SetNextWindowPos(ImGui::GetMainViewport()->Pos + ImVec2((float)window_x, (float)window_y)); ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f); flags |= ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoBringToFrontOnFocus;