Added stub controller LED functions for WGI and RAWINPUT (thanks meyraud!)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
diff --git a/src/joystick/windows/SDL_rawinputjoystick.c b/src/joystick/windows/SDL_rawinputjoystick.c
index 9d752bf..2cec877 100644
--- a/src/joystick/windows/SDL_rawinputjoystick.c
+++ b/src/joystick/windows/SDL_rawinputjoystick.c
@@ -614,6 +614,19 @@ RAWINPUT_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Ui
return device->driver->RumbleJoystick(&device->hiddevice, joystick, low_frequency_rumble, high_frequency_rumble);
}
+static SDL_bool
+RAWINPUT_JoystickHasLED(SDL_Joystick * joystick)
+{
+ return SDL_FALSE;
+}
+
+static int
+RAWINPUT_JoystickSetLED(SDL_Joystick * joystick, Uint8 red, Uint8 green, Uint8 blue)
+{
+ return SDL_Unsupported();
+}
+
+
static void
RAWINPUT_JoystickUpdate(SDL_Joystick * joystick)
{
@@ -743,6 +756,8 @@ SDL_JoystickDriver SDL_RAWINPUT_JoystickDriver =
RAWINPUT_JoystickGetDeviceInstanceID,
RAWINPUT_JoystickOpen,
RAWINPUT_JoystickRumble,
+ RAWINPUT_JoystickHasLED,
+ RAWINPUT_JoystickSetLED,
RAWINPUT_JoystickUpdate,
RAWINPUT_JoystickClose,
RAWINPUT_JoystickQuit,
diff --git a/src/joystick/windows/SDL_windows_gaming_input.c b/src/joystick/windows/SDL_windows_gaming_input.c
index e491d3e..b186559 100644
--- a/src/joystick/windows/SDL_windows_gaming_input.c
+++ b/src/joystick/windows/SDL_windows_gaming_input.c
@@ -575,6 +575,18 @@ WGI_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint16
}
}
+static SDL_bool
+WGI_JoystickHasLED(SDL_Joystick * joystick)
+{
+ return SDL_FALSE;
+}
+
+static int
+WGI_JoystickSetLED(SDL_Joystick * joystick, Uint8 red, Uint8 green, Uint8 blue)
+{
+ return SDL_Unsupported();
+}
+
static Uint8
ConvertHatValue(__x_ABI_CWindows_CGaming_CInput_CGameControllerSwitchPosition value)
{
@@ -717,6 +729,8 @@ SDL_JoystickDriver SDL_WGI_JoystickDriver =
WGI_JoystickGetDeviceInstanceID,
WGI_JoystickOpen,
WGI_JoystickRumble,
+ WGI_JoystickHasLED,
+ WGI_JoystickSetLED,
WGI_JoystickUpdate,
WGI_JoystickClose,
WGI_JoystickQuit,