Simple Directmedia Layer
Go to file
Sam Lantinga b3848c5120 Fixed bug 5445 - Incorrect Switch Pro Controller face buttons when SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS disabled
jibb

I'm testing with DualShock 4, DualSense, Switch Pro Controller, and PowerA Switch Controller.

I'm using the standard mapping file from here:
https://raw.github.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt

With SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS turned off (set to "0") I expect the button positions to be the same on all devices, based on Xbox controller button naming (eg SDL_GameControllerGetButton(g, SDL_CONTROLLER_BUTTON_Y) gives me whether the North face button is pressed).

However, the Switch Pro Controller layout is wrong (matching labels rather than positions, so X and Y are swapped and A and B are swapped). And with the PowerA controller the East and West buttons are correct, but the North and South buttons are swapped instead.

Mathias Kaerlev

Also seeing this on 2.0.14. This is most likely a regression, since we weren't seeing this on an earlier SDL version.

I suspect it might be caused by this commit:
a569b21188 (diff-da9344d94c66b8c702a45e7649f412039f08bba83bd82de33f5c80ea9c8c39d5)

It seems like both the HIDAPI driver and SDL_gamecontroller.c will try to swap the buttons if the hint is set to 0, causing the button remap to cancel out.
2021-01-14 15:15:57 -08:00
acinclude acinclude/libtool.m4: Apply macos11 patch from libtool bug #44605 2021-01-09 00:11:20 +03:00
android-project Disabled Bluetooth if BLE is not supported 2021-01-07 19:33:12 -06:00
android-project-ant
build-scripts Fixed Xbox One Series X share button incorrectly triggering on newer firmware 2021-01-08 09:54:52 -08:00
cmake Fixed bug 5463 - generated Wayland interfaces are included in the library's ABI 2021-01-14 14:50:15 -08:00
debian Updated copyright for 2021 2021-01-02 10:25:38 -08:00
docs added documentation docs/README-os2.md (based on original readme.os2). 2020-10-14 23:01:06 +03:00
include Fixed bug 5451 - Can't create EGLSurface in Wayland from SDLWindow (no EGLNativeWindow pointer) 2021-01-14 14:42:53 -08:00
src Fixed bug 5445 - Incorrect Switch Pro Controller face buttons when SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS disabled 2021-01-14 15:15:57 -08:00
test testgamecontroller: log which controller the event came from 2021-01-13 11:01:54 -08:00
VisualC Add SDL_cond implementation using Windows Condition Variables 2020-12-28 11:43:11 -08:00
VisualC-WinRT Add SDL_cond implementation using Windows Condition Variables 2020-12-28 11:43:11 -08:00
visualtest
wayland-protocols
Xcode fixed permissions of xcode project file 2021-01-08 21:56:00 +03:00
Xcode-iOS Added weak linking to hidapi framework 2020-11-17 10:29:36 -08:00
.hgignore Fixed bug 4965 - Update the .hgignore file 2020-02-03 16:38:07 -08:00
Android.mk minor whitespace fix 2020-10-09 03:28:30 +03:00
autogen.sh
BUGS.txt
cmake_uninstall.cmake.in
CMakeLists.txt Fixed bug 5287 - Support building for UWP with CMake 2021-01-14 14:53:34 -08:00
configure Fixed bug 5463 - generated Wayland interfaces are included in the library's ABI 2021-01-14 14:50:15 -08:00
configure.ac Fixed bug 5463 - generated Wayland interfaces are included in the library's ABI 2021-01-14 14:50:15 -08:00
COPYING.txt Updated copyright for 2021 2021-01-02 10:25:38 -08:00
CREDITS.txt
INSTALL.txt
Makefile.in Fixed bug 5463 - generated Wayland interfaces are included in the library's ABI 2021-01-14 14:50:15 -08:00
Makefile.minimal
Makefile.os2 Updated SDL to version 2.0.15 for development 2020-12-22 10:36:15 -08:00
Makefile.pandora
Makefile.psp
Makefile.wiz
README-SDL.txt
README.txt
sdl2-config-version.cmake.in cmake: Forgot to add this file to revision control. 2020-02-25 14:52:03 -05:00
sdl2-config.cmake.in build: Merge pkg-config Libs.private into Libs for static-only builds 2020-04-11 23:38:34 +01:00
sdl2-config.in build: Don't duplicate Libs in Libs.private in pkg-config file 2020-04-12 13:24:36 +01:00
sdl2.m4 acinclude & sdl2.m4 updates: 2020-12-22 17:00:28 +03:00
sdl2.pc.in build: Merge pkg-config Libs.private into Libs for static-only builds 2020-04-11 23:38:34 +01:00
SDL2.spec.in
SDL2Config.cmake
TODO.txt
VisualC.html
WhatsNew.txt Fixed the name of the PS5 hint 2020-12-09 10:39:36 -08:00

                         Simple DirectMedia Layer

                                  (SDL)

                                Version 2.0

---
https://www.libsdl.org/

Simple DirectMedia Layer is a cross-platform development library designed
to provide low level access to audio, keyboard, mouse, joystick, and graphics
hardware via OpenGL and Direct3D. It is used by video playback software,
emulators, and popular games including Valve's award winning catalog
and many Humble Bundle games.

More extensive documentation is available in the docs directory, starting
with README.md

Enjoy!
	Sam Lantinga				(slouken@libsdl.org)