YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
21 stars 8 forks source link

In-Game: Mouse lock has stopped working on non-Windows platforms as of 2024.6 #7215

Open DragoniteSpam opened 1 month ago

DragoniteSpam commented 1 month ago

Description

I'm not entirely sure when it stopped working, but it definitely was working fairly recently.

Steps To Reproduce

  1. Run the attached project on Linux, HTML5, OperaGX, or (I assume) any other platform that isn't Windows
  2. Observe that you can see the mouse cursor and that moving the mouse in large circles beyond the runner window fails to move the camera
  3. (Optional) Run the attached project on Windows and observe that the mouse cursor is not visible and the camera rotates fine when moving the mouse in large circles beyond the runner window

Which version of GameMaker are you reporting this issue for?

2024.6 (Monthly) IDE v2024.800.0.606 Runtime v2024.800.0.630

Which platforms has this been reproduced on?

HTML5 GX.games

Which operating system(s) are you seeing the problem on?

Windows 10.0.19045.0

d19db29e-adc7-40bf-a4f0-c82a1284bbc1

YYDan commented 1 month ago

Same results for at least the two web platforms in June monthly, so have updated the info now. Will need to check the other platforms to confirm they fail in monthly also.

Emc1923 commented 1 month ago

I could confirm this is happening on Mac and Ubuntu in 2024.6 , however, I could only reproduce the issue on mac a few times. When I first ran the project after importing got the issue, then running the project again did show the expected results. Running the project using the Windows IDE targeting Mac does not reproduce. On Ubuntu I got a repro of 100%.

pkraif commented 2 weeks ago

The same issue is reported for HTML5 here: https://github.com/YoYoGames/GameMaker-Bugs/issues/6824

pkraif commented 1 week ago

I can't reproduce the issue on macOS (Macbook Air M2), but I can confirm mouse lock doesn't work on Ubuntu. Apparently it's because of Wayland, which doesn't support moving the mouse cursor with code. When I disable Wayland (see https://linuxconfig.org/how-to-enable-disable-wayland-on-ubuntu-22-04-desktop), it starts working. The same applies to functions window_mouse_set() and display_mouse_set() - both don't work on Ubuntu with Wayland enabled. It doesn't seem like we can fix this. Maybe we should add a warning about this to the manual for all these functions? @YYBartT @gurpreetsinghmatharoo

DragoniteSpam commented 1 week ago

And Linux fanatics wonder why more people don't want to use it 🙃

YYBartT commented 6 days ago

Added a note to the window_mouse_set(), display_mouse_set() and window_mouse_set_locked() function pages.