Skip to content

Commit 91180f8

Browse files
committed
Disable SDL_HINT_JOYSTICK_RAWINPUT by default
Windows can get in a state when it stops reporting raw input events for game controllers until reboot. The downside of this change is that we lose support for trigger rumble and are limited to 4 controllers again, but if that's important for your application you can use SDL_SetHint(SDL_HINT_JOYSTICK_RAWINPUT, true) to enable this functionality. Fixes #13047 (cherry picked from commit aa870d5)
1 parent 99aa859 commit 91180f8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/SDL3/SDL_hints.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2026,8 +2026,8 @@ extern "C" {
20262026
*
20272027
* The variable can be set to the following values:
20282028
*
2029-
* - "0": RAWINPUT drivers are not used.
2030-
* - "1": RAWINPUT drivers are used. (default)
2029+
* - "0": RAWINPUT drivers are not used. (default)
2030+
* - "1": RAWINPUT drivers are used.
20312031
*
20322032
* This hint should be set before SDL is initialized.
20332033
*

src/joystick/windows/SDL_rawinputjoystick.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ static bool RAWINPUT_JoystickInit(void)
10301030
{
10311031
SDL_assert(!SDL_RAWINPUT_inited);
10321032

1033-
if (!SDL_GetHintBoolean(SDL_HINT_JOYSTICK_RAWINPUT, true)) {
1033+
if (!SDL_GetHintBoolean(SDL_HINT_JOYSTICK_RAWINPUT, false)) {
10341034
return true;
10351035
}
10361036

0 commit comments

Comments
 (0)