소스 검색

Document how to check for gamepad capabilities

Fixes https://github.com/libsdl-org/SDL/issues/10593
Sam Lantinga 1 년 전
부모
커밋
c744c8fc0b
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      include/SDL3/SDL_gamepad.h

+ 4 - 0
include/SDL3/SDL_gamepad.h

@@ -51,6 +51,10 @@
  * If you would like to receive gamepad updates while the application is in
  * the background, you should set the following hint before calling
  * SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
+ *
+ * Gamepads support various optional features such as rumble, color LEDs, touchpad, gyro, etc. The support for these features varies depending on the controller and OS support available. You can check for LED and rumble capabilities at runtime by calling SDL_GetGamepadProperties() and checking the various capability properties. You can check for touchpad by calling SDL_GetNumGamepadTouchpads() and check for gyro and accelerometer by calling SDL_GamepadHasSensor().
+ *
+ * By default SDL will try to use the most capable driver available, but you can tune which OS drivers to use with the various joystick hints in SDL_hints.h.
  */
 
 #ifndef SDL_gamepad_h_