Hello there.
Sooo, I was thinking about (and even once asked here on forums) about guessing type of gamepad (even 3rd party gamepads) and showing correct icons to user.
And I started working on database (which itself based on SDL community database): https://github.com/Vovkiv/gamepads_types_database, a csv file were I assign gamepad type based on GUID and name of gamepads.
And for this database to be useful, you actually need some implementation, and so here it is: https://github.com/Vovkiv/gamepad_guesser_solution
If anyone want to try it out, please, do so and share feeback!
All details are in repo. And, also, note, to see all possible types look here: https://github.com/Vovkiv/gamepads_type ... file#types
If everything will work out fine, I will continue developing implementations for other engines (like Godot, which doesn't use SDL for inputs as of now, but uses SDL database for gamepads mappings)/frameworks
Note: once love will move to 12.0 (which should mean SDL3), this implementation might become less relevant/completely useless, since SDL 3 seems to introduce such functionality https://wiki.libsdl.org/SDL3/SDL_GamepadType
My solution still might give better/more accurate typing, easier to add new type to database, but until then, you could try my solution.
And, also, here quick demo:
It is just packaged version of https://github.com/Vovkiv/gamepad_guess ... al_example (will be dead link soon enough. Check attachments to this post or latest reply from me), so for more details refer there. But in general: connect and disconnect gamepad to see any effects.
If you connect any official (or 3rd party) PlayStation gamepads PS4 blue cross will be visible, B red for any Nintendo gamepad (or 3rd party), A green for XBOX gamepads (or 3rd party) and for any other gamepads.
(This time even with icon!)[Library] Gamepad Guesser Solution
[Library] Gamepad Guesser Solution
- Attachments
-
- gamepads_types_database-main.zip
- (200.75 KiB) Downloaded 29 times
-
- gamepad_guesser_solution-main.zip
- (300.25 KiB) Downloaded 30 times
Last edited by GVovkiv on Fri Jan 03, 2025 10:05 am, edited 1 time in total.
Re: [Library] Gamepad Guesser Solution
Copy of library repo and database repo.
Who is online
Users browsing this forum: Bing [Bot] and 2 guests