Open SeongGino opened 2 months ago
Small correction: XWayland doesn't solve the issue very well either, as the core cursor is disconnected from the system's in a way that isn't normal for regular X11 functionality.
Using Windowed mode just for sake of demonstration with a visible cursor, this still applies in fullscreen--note how MAME's blue aim reticle is nowhere near the system's black cursor. In practical terms, I can't aim beyond the bottom-left quadrant of the game screen area without it snapping to offscreen.
I was under the impression that Wayland only supports 1 system-wide cursor, but failed to find a normative reference, instead I ran into a couple of old issues telling that for graphics tablets, there is actually a second cursor.
When graphics context driver is Wayland, input driver will also be forced to Wayland, it cannot be changed to udev (even though it may appear in the menu like that).
I was under the impression that Wayland only supports 1 system-wide cursor, but failed to find a normative reference, instead I ran into a couple of old issues telling that for graphics tablets, there is actually a second cursor.
When graphics context driver is Wayland, input driver will also be forced to Wayland, it cannot be changed to udev (even though it may appear in the menu like that).
I'm not particularly well-versed in the differences of the display servers, but where would you say the root cause of the problem is?
Basically, is this at the fault of Wayland itself; and if so, perhaps where would this kind of issue be posted for more constructive resolution? Wayland itself? The Plasma compositor?
And ideally, I'd at least like the XWayland fallback to still work, but not sure if that's also another Wayland-specific issue rather than the fault of RetroArch. For as good as Wayland mostly is elsewhere, lightguns are the single biggest blocker for me at the moment (which makes things no less easier when you're also developing a lightgun system) and RA has been my goto for virtually everything that isn't a Wii, PS2/3, or Windows-based Arcade title.
Now that I think about it, I've noticed in Wine that the behavior with XWayland is incredibly similar - relative mouse input is okay, but any abs/gun coords are ignored. Honestly, the more I've been thinking about this, the more my head's being done in.
(Just to be clear, any frustrations being vented here aren't with RA itself, but more just exasperated at the general state of Wayland for my inconveniently hyper niche usecase)
I found something that may explain the single mouse device better (not sure if it is up to date): https://wayland-book.com/seat.html The lightgun related part of the wayland input driver is scattered with todo's, so there may be some missing parts also on the RetroArch side of the court. https://github.com/libretro/RetroArch/blob/98c79b3f146938a44205418b83793e85af5202b8/input/drivers/wayland_input.c#L365
I have checked it in a bit more detail, I believe it could be improved a bit on the Wayland input driver side, I'll just need to set up some kind of test tooling so that I can reliably verify different scenarios.
Description
On Linux in a native Wayland session (simply running
retroarch
) with any input plugin (soudev
orwayland
), RetroArch does not seem able to support multiple mice - furthermore, trying to use any pointer device (whether it be absolute positioning lightgun or normal relative mouse) will not move the point of aim/aiming reticle in lightgun games.To work around this, running RetroArch in XWayland is needed - in my case, using
WAYLAND_DISPLAY="" retroarch
forces RA to run in XWayland, and I can have access to a fully functioningudev
input driver with multiple mice support.Mouse Devices list under native Wayland (either
udev
orwayland
input driver):Mouse Devices list under XWayland with
udev
input driver:In both examples, a Logitech G502 mouse and an OpenFIRE Lightgun are plugged into the PC, running under a user in the
input
group.Expected behavior
At minimum, the ability to use a mouse device in lightgun games on a native Wayland RetroArch session; ideally,
udev
orwayland
input driver should have feature parity withudev
driver under X11 with the ability to address and use individual pointer devices for multiplayer.Actual behavior
No mouse input is allowed in cores in either
udev
orwayland
input drivers on native Wayland RetroArch.Steps to reproduce the bug
udev
retroarch
)WAYLAND_DISPLAY="" retroarch
)Bisect Results
N/A (has this always been an issue?)
Version/Commit
Environment information