Browse Source

Enable Steam Controller support by default

It now handles both wired and wireless controllers and Steam will set SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES for Steam Controllers if it's handling them.
Sam Lantinga 10 months ago
parent
commit
140aba9e5d

+ 2 - 1
src/joystick/hidapi/SDL_hidapi_steam.c

@@ -981,7 +981,8 @@ static void HIDAPI_DriverSteam_UnregisterHints(SDL_HintCallback callback, void *
 
 static bool HIDAPI_DriverSteam_IsEnabled(void)
 {
-    return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_STEAM, false);
+    return SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_STEAM,
+                              SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, SDL_HIDAPI_DEFAULT));
 }
 
 static bool HIDAPI_DriverSteam_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name, SDL_GamepadType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol)

+ 1 - 1
src/joystick/hidapi/SDL_hidapijoystick_c.h

@@ -32,7 +32,7 @@
 #define SDL_JOYSTICK_HIDAPI_PS4
 #define SDL_JOYSTICK_HIDAPI_PS5
 #define SDL_JOYSTICK_HIDAPI_STADIA
-#define SDL_JOYSTICK_HIDAPI_STEAM // Simple support for BLE Steam Controller, hint is disabled by default
+#define SDL_JOYSTICK_HIDAPI_STEAM
 #define SDL_JOYSTICK_HIDAPI_STEAMDECK
 #define SDL_JOYSTICK_HIDAPI_SWITCH
 #define SDL_JOYSTICK_HIDAPI_WII