snowcone-ltd / libmatoya

Cross-platform application development.
MIT License
592 stars 53 forks source link

Auto-detecting a laptop touchpad as a gamepad #80

Open NetSysFire opened 1 year ago

NetSysFire commented 1 year ago

When I first launched parsec on my laptop, I almost immediately noticed severe glitchiness.

The cause for that it auto-detected my touchpad as a gamepad and actually used it right away without any user input, amplifying mouse movement and making navigation of the application impossible.

Steps to reproduce

  1. Launch parsec on a Linux laptop. In my case this is a Dell Latitude 3500 running Arch Linux, but I imagine it will also be reproducible with similar devices or even on a desktop with a touchpad connected, as this is not really unique.
  2. If no glitchiness is happening yet, navigate to the gamepad settings section and your touchpad should pop up immediately and is auto-enabled.
  3. Glitchiness because mouse movement is amplified.

Expected behavior

Do not setup touchpads as gamepads or require manual enabling for such devices. On Linux, many devices have metadata, too, so filtering out touchpads should be trivial. I am fairly sure there are already libraries for this, e.g sdl2, which you can look at for references.