From 6c2f9bc41e8667a0002d14307a566ec1b53345e5 Mon Sep 17 00:00:00 2001 From: Katharine Chui Date: Mon, 5 Jan 2026 17:14:26 +0100 Subject: [PATCH] hidapi: Disable hidapi LG4FF on windows (#14762) hid.dll simply cannot send 7 bytes reports unlike other platforms It enforces full length repots of 17 from the device's descriptor, which does not work on the device. This breaks ffb and led control, so we disable this by default on windows. --- src/joystick/hidapi/SDL_hidapi_lg4ff.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/joystick/hidapi/SDL_hidapi_lg4ff.c b/src/joystick/hidapi/SDL_hidapi_lg4ff.c index 24eb76f991..0dfae429b4 100644 --- a/src/joystick/hidapi/SDL_hidapi_lg4ff.c +++ b/src/joystick/hidapi/SDL_hidapi_lg4ff.c @@ -110,8 +110,17 @@ static void HIDAPI_DriverLg4ff_UnregisterHints(SDL_HintCallback callback, void * static bool HIDAPI_DriverLg4ff_IsEnabled(void) { - bool enabled = SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_LG4FF, - SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, SDL_HIDAPI_DEFAULT)); + #if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINGDK) + /* + * hid.dll simply cannot send 7 bytes reports unlike other platforms + * it enforces full length repots of 17 from the device's descriptor, which does not work on the device + * this breaks ffb and led control, so we disable this by default + */ + bool hint_default = false; + #else + bool hint_default = SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI, SDL_HIDAPI_DEFAULT); + #endif + bool enabled = SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_LG4FF, hint_default); return enabled; }