Browse Source

Merge pull request #103021 from Hilderin/fix-embedded-game-start-location-windows

Fix Embedded Game startup location on Windows
Thaddeus Crews 8 months ago
parent
commit
70eb62faf2
1 changed files with 7 additions and 7 deletions
  1. 7 7
      platform/windows/display_server_windows.cpp

+ 7 - 7
platform/windows/display_server_windows.cpp

@@ -6124,15 +6124,15 @@ DisplayServer::WindowID DisplayServerWindows::_create_window(WindowMode p_mode,
 			WindowRect.top = wpos.y;
 			WindowRect.bottom = wpos.y + p_rect.size.y;
 		}
+	}
 
-		WindowRect.left += offset.x;
-		WindowRect.right += offset.x;
-		WindowRect.top += offset.y;
-		WindowRect.bottom += offset.y;
+	WindowRect.left += offset.x;
+	WindowRect.right += offset.x;
+	WindowRect.top += offset.y;
+	WindowRect.bottom += offset.y;
 
-		if (p_mode != WINDOW_MODE_FULLSCREEN && p_mode != WINDOW_MODE_EXCLUSIVE_FULLSCREEN) {
-			AdjustWindowRectEx(&WindowRect, dwStyle, FALSE, dwExStyle);
-		}
+	if (p_mode != WINDOW_MODE_FULLSCREEN && p_mode != WINDOW_MODE_EXCLUSIVE_FULLSCREEN) {
+		AdjustWindowRectEx(&WindowRect, dwStyle, FALSE, dwExStyle);
 	}
 
 	WindowID id = window_id_counter;