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
1 file changed
tree: ff7d20b481c0c0d49da500151d3f760d983d6594
  1. .github/
  2. acinclude/
  3. android-project/
  4. android-project-ant/
  5. build-scripts/
  6. cmake/
  7. docs/
  8. include/
  9. mingw/
  10. src/
  11. test/
  12. VisualC/
  13. VisualC-GDK/
  14. VisualC-WinRT/
  15. visualtest/
  16. wayland-protocols/
  17. Xcode/
  18. Xcode-iOS/
  19. .clang-format
  20. .editorconfig
  21. .gitignore
  22. .wikiheaders-options
  23. AGENTS.md
  24. Android.mk
  25. autogen.sh
  26. BUGS.txt
  27. CLAUDE.md
  28. cmake_uninstall.cmake.in
  29. CMakeLists.txt
  30. configure
  31. configure.ac
  32. CREDITS.txt
  33. INSTALL.txt
  34. LICENSE.txt
  35. Makefile.in
  36. Makefile.minimal
  37. Makefile.os2
  38. Makefile.pandora
  39. Makefile.w32
  40. README-SDL.txt
  41. README.md
  42. sdl2-config-version.cmake.in
  43. sdl2-config.cmake.in
  44. sdl2-config.in
  45. sdl2.m4
  46. sdl2.pc.in
  47. SDL2.spec.in
  48. SDL2Config.cmake.in
  49. TODO.txt
  50. WhatsNew.txt
README.md

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)