SDL_hidapi_xbox360.c: Fix Y axis inversion on macOS (#15792) Originally, macOS had opposite Y axis inversion as every other platform, likely to correct for an issue with the virtual gamepad reported by the old 360Controller driver. Wired Xbox 360 controllers using native macOS drivers were first reported to be broken in https://github.com/libsdl-org/SDL/issues/11002. The inversion was removed in https://github.com/libsdl-org/SDL/commit/7da728a642f2acfbba9543a3587363908d7aa1c3, presumably breaking 360Controller usage, but fixing wired 360 controller using the new native support in macOS 15 and above. However, this change was reverted without explanation in https://github.com/libsdl-org/SDL/commit/d7b1ba1bfca7c9bf4f57075258ccfa0e0c6b2051 which added explicit support for the Steam Virtual Gamepad. Presumably, Steam on macOS reports inverted Y axes to match what SDL expected on the platform. However, this reversion broke the native macOS controller support. The incorrect inversion also breaks using off-brand 360-class gamepads via the libusb backend of HIDRAW. Backport of 157c839139fbea8ff2b49a3e6a0637aef1346f57 (https://github.com/libsdl-org/SDL/pull/15792) to SDL2
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)