-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gamepad support: Device 0 already taken by fingerprint reader on Android #47656
Comments
For the record, this was originally posted on Reddit. Quoting for posterity:
|
The problem exists even on some devices that do not have a fingerprint sensor. I tried to fix the gamepad detection like here, but that only fixed the issue on Xiaomi devices. The only solution is to ignoring the "gamepads" with the names "uinput-fpc", "uinput-goodix", but this most likely should happen at the engine level |
Godot 3.5 the same problem is reported from Redmi note 10 lite with android 11 |
I did some reasearch and I came up with the following list:
As @ICatRegister mentioned, I think this "blacklist" should be controlled via the engine, and disregard those names as inputs (or at least as joypad/controller inputs) As a side note, because this issue is for Android, I found out that iOS also seems to get some kind of "ghost" controller on |
Someone on Twitter pointed out that those inputs might be used "to read gestures like swiping and such", so now I don't know if it might be a good idea to just disregard them, but maybe control them in some way so they are treated as "special" input or something. Here's what I ended up doing. Basically, brute force :P
|
I ran into this problem myself. This is an OS bug that must be workarounded. This is the output of a POCO X4 Pro:
All numbers are in decimal. The only proper workaround is the proposed one: ignore at engine level these broken devices by name: if (device.name.startsWith("uinput-")) {
// Broken OS that report fingerprint scanner and other
// unrelated devices as both GAMEPAD and JOYSTICK.
//
// At the very least these are known to cause problems:
// uinput-fpc
// uinput-fortsense
// uinput-goodix
Log.w("Godot", "Ignoring input device: " + device.name)
return false;
} |
CC @m4gr3d |
Godot version: 3.2.3
OS/device:
Running Godot on Windows 10
Running game on Xiaomi Redmi 9 with Android 10 (MIUI 12 if that's relevant)
Issue description:
Expected: Device 0 is nothing or bluetooth joypad that is synced
Result: Device 0 is "uinput-fpc" and if a joypad is synced the joypad is device 1
Steps to reproduce:
make Input.get_joy_name(0) readable while running a game on the device
minimal example.zip
The text was updated successfully, but these errors were encountered: