mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 11:48:55 +01:00
06c141475c
Implements native standard layout for Linux gamepads by using the kernel-provided button IDs, thereby expanding support to gamepads not listed in gamecontrollerdb.txt. Linux's docs: https://www.kernel.org/doc/Documentation/input/gamepad.txt SDL2's source: https://fossies.org/linux/SDL2/src/joystick/linux/SDL_sysjoystick.c#l_1740 Note that I am NOT 100% convinced about the X/Y swap between Xbox and PlayStation controllers - the Xbox compatible pad I have however does have BTN_NORTH and BTN_WEST swapped (and thus BTN_X and BTN_Y assigned right), which confirms SDL's logic and opposes the kernel docs. Tested with this gamepad: "20d6:2802 BDA Xbox ONE Core controller", label says "PowerA Model 1508491-02" - even after clearing out gamecontrollerdb.txt, examples/gamepad shows a 100% correct mapping. Closes #2052 |
||
---|---|---|
.. | ||
api_cf_darwin.go | ||
api_desktop_windows.go | ||
api_hid_darwin.go | ||
api_ios.go | ||
api_linux.go | ||
api_xbox_windows.go | ||
button.go | ||
extern_android.go | ||
gamepad_android.go | ||
gamepad_darwin.go | ||
gamepad_desktop_windows.go | ||
gamepad_ios.go | ||
gamepad_js.go | ||
gamepad_linux.go | ||
gamepad_nintendosdk.cpp | ||
gamepad_nintendosdk.go | ||
gamepad_nintendosdk.h | ||
gamepad_null.go | ||
gamepad_windows.go | ||
gamepad_xbox_windows.go | ||
gamepad.go |