Skip to content

Conversation

Nintorch
Copy link
Contributor

Description

Previously, SDL_ShouldIgnoreJoystick wasn't being called for Android, and fingerprint sensors were recognized as joysticks. I also decided to change the code a little bit so other fingerprint sensors (possible fingerprint sensors list here: godotengine/godot#47656 (comment)) are ignored too. This change was tested using Godot Engine in my fork in a separate branch: https://github.com/Nintorch/godot/tree/sdl-test and I can confirm it works as expected.

Existing Issue(s)

#4971

Previously, SDL_ShouldIgnoreJoystick wasn't being called for Android, and fingerprint sensors were recognized as joysticks.
@AntTheAlchemist
Copy link
Contributor

I have a Pixel 5. Why am I not seeing the fingerprint sensor as a joystick?

@Nintorch
Copy link
Contributor Author

I have a Pixel 5. Why am I not seeing the fingerprint sensor as a joystick?

Hi, if you mean you're not seeing your fingerprint sensor as a joystick without this PR, that's interesting, because for me the fingerprint sensor on my phone (Xiaomi Redmi Note 11) does get recognized (as "uinput-fpc")

@AntTheAlchemist
Copy link
Contributor

Yes, that's what I mean. I've never seen a finger print scanner be enumerated as a joystick on Android. Tested on Pixel 5, and several Samsung phones. I'm using the latest SDL3 from source.

Maybe it's a certain Android version that does this?

If you like, I can step through the Java code where SDL enumerates devices and see what's going on?

@Nintorch
Copy link
Contributor Author

My phone currently uses Android 13, and, for more context, this bug was found while I was working on one of my Godot Engine PRs ( godotengine/godot#109645 specifically), Godot Engine currently uses SDL 3.2.16.

If you like, I can step through the Java code where SDL enumerates devices and see what's going on?

Sure, thank you!

@slouken
Copy link
Collaborator

slouken commented Aug 25, 2025

For reference, the list of fingerprint devices found by @hiulit is:
godotengine/godot#47656 (comment)

@slouken slouken merged commit 1af7dfb into libsdl-org:main Aug 25, 2025
41 checks passed
@slouken
Copy link
Collaborator

slouken commented Aug 25, 2025

Merged and cherry-picked, thanks!

@Nintorch
Copy link
Contributor Author

Thank you! :)

@Nintorch Nintorch deleted the android-ignore-joystick branch August 25, 2025 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants