mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-30 23:18:29 +00:00
joystick: Convert HasLED() into a generic GetCapabilities() function
This commit is contained in:

committed by
Sam Lantinga

parent
1ba695dc94
commit
1ccfbf963e
@@ -121,6 +121,9 @@ struct _SDL_Joystick
|
||||
#define SDL_HARDWARE_BUS_USB 0x03
|
||||
#define SDL_HARDWARE_BUS_BLUETOOTH 0x05
|
||||
|
||||
/* Joystick capability flags for GetCapabilities() */
|
||||
#define SDL_JOYCAP_LED 0x01
|
||||
|
||||
/* Macro to combine a USB vendor ID and product ID into a single Uint32 value */
|
||||
#define MAKE_VIDPID(VID, PID) (((Uint32)(VID))<<16|(PID))
|
||||
|
||||
@@ -164,8 +167,10 @@ typedef struct _SDL_JoystickDriver
|
||||
int (*Rumble)(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble);
|
||||
int (*RumbleTriggers)(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble);
|
||||
|
||||
/* Capability detection */
|
||||
Uint32 (*GetCapabilities)(SDL_Joystick *joystick);
|
||||
|
||||
/* LED functionality */
|
||||
SDL_bool (*HasLED)(SDL_Joystick *joystick);
|
||||
int (*SetLED)(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue);
|
||||
|
||||
/* General effects */
|
||||
|
Reference in New Issue
Block a user