RetroArch icon indicating copy to clipboard operation
RetroArch copied to clipboard

[Feature Request] x11 input driver multi-mouse support

Open Codes4Fun opened this issue 2 years ago • 1 comments

Description

X11 has support for multiple mice, configurable by users, and udev has permission issues on some linux distros, this seems like a better solution in those cases

Expected behavior

Retroarch is able to use/track multiple mice in x11.

Actual behavior

Retroarch only follows one mouse. For example in the opera core, both blue/red cursors follow the first mouse.

Steps for creating multiple mice under linux x11

  1. hook up a second mouse/touchpad to a linux/x11 computer.
  2. use xinput create-master mouse2 to create a second virtual mouse called mouse2.
  3. use xinput to display ids, and attach second mouse id to mouse2 id via xinput reattach 9 18 replacing 9 with second mouse id and 18 with mouse2 virtual mouse id.

Notes for retroarch changes to the x11 input driver to support reading a second mouse

Basically retroarch would use XIQueryPointer instead of XQueryPointer to read a second mouse. I experimentally hacked the code with hard coded ids and it does work but it needs to be figured out how to get the virtual mouse ids, and x11_input.c would needs to add support for storing multiple mouse states to pass on to the core.

I plan to research this further and post more information here, and unless an official dev/contributor takes this on, I will eventually try to create a patch for this.

Codes4Fun avatar Sep 15 '23 15:09 Codes4Fun

Similar issue for Wayland input driver.

gouchi avatar Aug 18 '24 20:08 gouchi