CurryKitten / CurryKitten-Sim

FPV quad simulator
70 stars 7 forks source link

Issue with Android users seeing UINPUT-FPC as a joystick #95

Closed CurryKitten closed 3 years ago

CurryKitten commented 3 years ago

Several users reported not having touch controls available and then seeing that the "joystick" has been set to UINPUT-FPC

Screenshot_2021-07-10-18-11-05-636_com CurryKitten CKFPVSimMobile

After some checking, the uinput-fpc device appears to be the fingerprint scanner, which is on pixel phones and some others. There's no particular reason that it's appearing as a joystick, other than Android reports it as such. Rewired then picks this up as an unknown joystick and then remove the touch controls.

CurryKitten commented 3 years ago

I've put in a fairly fast fix for this one. My first instinct was to manually cull any joystick that has a name of uinput-fpc, but I figured there could be a few more devices out there. So instead I made a new option in the System Config & Setup so the user could choose to always show touch controls

Screenshot 2021-07-11 at 09 37 25

By choosing this option, it means that joystick will be ignored, so if they want to then use one, this will need to be unticked, and then it will be the case of choosing the actual joystick (instead of the uinput-fpc device) from the list. This isn't quite as clean as I'd like it. I'd like a way of having the device not be picked up as a joystick in the first place. I know that the OS is the problem here, but I've posted in the Rewired developer forum to see if there's a way of "black listing" a controller so it's ignored as a possible joystick controller.