mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
cmd/ebitenmobile: Bug fix: Skip 'uinput-fpc' on the joystick detection on Android
Apparently 'uinput-fpc' is a fingerprint reader and is recognized as a joystick unexpectedly. This was often a primary gamepad on Ebiten and confused Ebiten applications. This change fixes this issue by skipping 'uinput-fpc' at the joystick detection. Closes #1542
This commit is contained in:
parent
5c5a2cf0f8
commit
1a2b308ae3
@ -520,6 +520,12 @@ public class EbitenView extends ViewGroup implements InputManager.InputDeviceLis
|
||||
if (inputDevice == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// A fingerprint reader is unexpectedly recognized as a joystick. Skip this (#1542).
|
||||
if (inputDevice.getName().equals("uinput-fpc")) {
|
||||
return;
|
||||
}
|
||||
|
||||
int sources = inputDevice.getSources();
|
||||
if ((sources & InputDevice.SOURCE_GAMEPAD) != InputDevice.SOURCE_GAMEPAD &&
|
||||
(sources & InputDevice.SOURCE_JOYSTICK) != InputDevice.SOURCE_JOYSTICK) {
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user