Fix game viewport size to not include DPI scale (screen-space uses it)

#2976
This commit is contained in:
Wojtek Figat
2025-02-26 20:55:57 +01:00
parent 2d956ebb36
commit 809fd2653a
3 changed files with 13 additions and 4 deletions

View File

@@ -30,7 +30,7 @@ DECLARE_SCRIPTING_TYPE_NO_SPAWN(Screen);
API_PROPERTY() static void SetIsFullscreen(bool value);
/// <summary>
/// Gets the window size.
/// Gets the window size (in screen-space, includes DPI scale).
/// </summary>
/// <returns>The value</returns>
API_PROPERTY() static Float2 GetSize();
@@ -50,7 +50,7 @@ DECLARE_SCRIPTING_TYPE_NO_SPAWN(Screen);
API_FUNCTION() static Float2 GameViewportToScreen(const Float2& viewportPos);
/// <summary>
/// Sets the window size.
/// Sets the window size (in screen-space, includes DPI scale).
/// </summary>
/// <remarks>
/// Resizing may not happen immediately. It will be performed before next frame rendering.