In-Game: [Windows] application_surface dimensions do not match window_get_height/width() values after player manually resizes the game window #6440
Labels
project
This issue has a sample project attached
runner-bug
In-game bugs with the "GameMaker Studio 2" runtimes
Description
Using
application_get_position
and summing the position plus dimensions of the app surface, you would expect those values to match what is reported bywindow_get_width
andwindow_get_height
This is demonstrably false after updating the window size via resize handles and comparing the returned values. This may come down to rounding errors though as the integer values are returned, meaning some sort of truncation could be yielding an off by 1 (sometimes 2) error.
Steps To Reproduce
Enable the ability to resize the window in the game options for the windows target, under the graphics option.
Create an object that prints the window width and height.
use
application_get_position
and sum indices[0]
and[2]
to calculate the width, and[1]
and[3]
to calculate the height.Print those values out, and compare them to the other printed values.
Prior to updating the window size, these values will be equal.
resize the window.
Compare the values now and see they are off by either 1 or 2.
Optionally run the included project and update the window, then compare
Which version of GameMaker are you reporting this issue for?
IDE v2024.4.0.137 Runtime v2024.4.0.168
Which operating system(s) are you seeing the problem on?
Windows 10.0.19045.0
Which platform(s) are you seeing the problem on?
Windows
7552081e-13aa-43c0-ae4a-8c38e3c313fa
The text was updated successfully, but these errors were encountered: