In-Game: window_mouse_set() malfunctions when the game window is positioned at 0,0 #8600
Labels
project
This issue has a sample project attached
runner-bug
In-game bugs with the "GameMaker Studio 2" runtimes
Description
When in windowed mode and the window position is <0, 0>:
window_mouse_set
does not position the mouse at the intended coordinates, but at an offset position instead. The offset might be equal to the thickness of the top and left window "chrome" (the OS gaphical UI border).window_mouse_get_delta_x/y
correctly return 0 when the mouse is at rest, unlike the next situation:window_mouse_set_locked(true)
,window_mouse_get_delta_x/y
constantly return nonzero numbers when the mouse is at rest.window_mouse_set(window_get_width()/2, window_get_height()/2)
.If the window is at any(?) other position, even <1, 0>, everything works correctly.
Problem observed in Windows VM and YYC; untested on other platforms.
Steps To Reproduce
Run the attached example project, and use the Enter key to switch mouse positions, and Space key to move the window position between <0, 0> (malfunctioning) and <1, 0> (working correctly)
Or, specifically:
Call
window_set_position(0, 0)
then try using eitherwindow_mouse_set
, orwindow_mouse_get_delta_x/y
in conjunction withwindow_mouse_set_locked(true)
Which version of GameMaker are you reporting this issue for?
IDE v2024.800.0.618 Runtime v2024.800.0.642
Which operating system(s) are you seeing the problem on?
Windows 6.1.7601.0
Which platform(s) are you seeing the problem on?
Windows
4bc7b11f-d076-4509-8c19-7a8327a9a65f
The text was updated successfully, but these errors were encountered: