love2d-community / awesome-love2d

A curated list of amazingly awesome LÖVE libraries, resources and shiny things.
Creative Commons Zero v1.0 Universal
3.33k stars 208 forks source link

Add GamepadGuesser #244

Closed idbrii closed 1 year ago

idbrii commented 1 year ago

GamepadGuesser Guesses what a gamepad should look like and provides a default set of art that matches the input gamepad.

Simplify showing gamepad icons with gamepadguesser. It loads the extensive SDL_GameControllerDB for better gamepad support, maps joysticks to appearance (console-specific buttons like Xbox, Nintendo, ...), and builds images on demand for each GamepadButton and GamepadAxis.

You can also use gamepadguesser with your own art. The easiest way is to modify the art in gamepadguesser/assets/images/ to ensure the correct file names. It also has a low-level API that avoids any automatic magic and lets you just query information about connected gamepads.

Doesn't correctly detect in lovejs due to missing support (all gamepads appear to be xbox gamepads in web builds).

Requires love2d 11.3+

MIT licensed.