Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

I’ll look into building a Linux demo next time I’ll be doing something with Linux, but I can tell you right away that this is likely not the extension you’re looking for - it’s for confining the cursor to an area (Windows, via ClipCursor) or the game window (Linux, via XGrabPointer) respectively. It does not provide you mouse movement deltas because those aren’t part of these APIs.

For deltas you’d want window_mouse_set_locked, and if that doesn’t work, you’d want to file a bug report for GM - XWAYLAND doesn’t implement some of the functions so applications may need separate X11/Wayland implementations for input.

Looking back at my initial comment, I notice I worded it badly enough for me to wonder how I am the one that wrote it... Sorry about that.

The window_mouse_get_delta_x() and window_mouse_get_delta_y() functions work fine, assuming the mouse would be locked to the center of the window. The issue is window_mouse_set_locked(true) marking the mouse as locked, but not actually locking it. The only functions from this extension which I think I'll need are display_mouse_lock() and maybe display_mouse_unlock().

I also looked up XGrabPointer, but I think that only works on X11. GameMaker's built-in window_mouse_set_locked(true) already has proper support on X11 I think, I need support for Wayland.

If filing a bug report is the best option, then I'll be doing that.

And I just realized this extension probably doesn't lock it to the center of  the window... I'm gonna go file a bug report.