From bc67702d8dd971d1d6d0034c5c0b3baed615b89b Mon Sep 17 00:00:00 2001 From: AL2009man <67606569+AL2009man@users.noreply.github.com> Date: Wed, 8 Oct 2025 14:00:16 -0400 Subject: [PATCH] Disable SDL_HINT_JOYSTICK_RAWINPUT by default backported from SDL3 commit aa870d5 Fixes #13047 (cherry picked from commit 8ef0a07a52161694bb5fdeb057c755e1dcb05180) --- include/SDL_hints.h | 4 ++-- src/joystick/windows/SDL_rawinputjoystick.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/SDL_hints.h b/include/SDL_hints.h index 32d7f85ac1..5132445198 100644 --- a/include/SDL_hints.h +++ b/include/SDL_hints.h @@ -1262,8 +1262,8 @@ extern "C" { * * This variable can be set to the following values: * - * - "0": RAWINPUT drivers are not used - * - "1": RAWINPUT drivers are used (the default) + * - "0": RAWINPUT drivers are not used (the default) + * - "1": RAWINPUT drivers are used */ #define SDL_HINT_JOYSTICK_RAWINPUT "SDL_JOYSTICK_RAWINPUT" diff --git a/src/joystick/windows/SDL_rawinputjoystick.c b/src/joystick/windows/SDL_rawinputjoystick.c index cd958b1ff9..6803f7d80c 100644 --- a/src/joystick/windows/SDL_rawinputjoystick.c +++ b/src/joystick/windows/SDL_rawinputjoystick.c @@ -1027,7 +1027,7 @@ static int RAWINPUT_JoystickInit(void) { SDL_assert(!SDL_RAWINPUT_inited); - if (!SDL_GetHintBoolean(SDL_HINT_JOYSTICK_RAWINPUT, SDL_TRUE)) { + if (!SDL_GetHintBoolean(SDL_HINT_JOYSTICK_RAWINPUT, SDL_FALSE)) { return 0; }