From 140aba9e5dac733156275b615955c38f4f75e8a5 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 14 Nov 2024 08:18:03 -0800 Subject: [PATCH] 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. --- src/joystick/hidapi/SDL_hidapi_steam.c | 3 ++- src/joystick/hidapi/SDL_hidapijoystick_c.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/joystick/hidapi/SDL_hidapi_steam.c b/src/joystick/hidapi/SDL_hidapi_steam.c index d5d12edf1e..83d923a805 100644 --- a/src/joystick/hidapi/SDL_hidapi_steam.c +++ b/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) diff --git a/src/joystick/hidapi/SDL_hidapijoystick_c.h b/src/joystick/hidapi/SDL_hidapijoystick_c.h index 2069b30324..1e08573798 100644 --- a/src/joystick/hidapi/SDL_hidapijoystick_c.h +++ b/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