From 8ef0a07a52161694bb5fdeb057c755e1dcb05180 Mon Sep 17 00:00:00 2001
From: AL2009man <[EMAIL REDACTED]>
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
---
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 32d7f85ac16f9..51324451981f8 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 cd958b1ff9eb0..6803f7d80c51d 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;
}