Revert "Disable the RAWINPUT joystick driver by default" Disabling RAWINPUT on Windows 10 causes these issues: * All Xbox controllers are named "XInput Controller". * Trigger rumble no longer works. * "XInput Controllers" are now also listed as separate haptic devices
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
diff --git a/WhatsNew.txt b/WhatsNew.txt
index fe7a334..0318b90 100644
--- a/WhatsNew.txt
+++ b/WhatsNew.txt
@@ -10,9 +10,6 @@ General:
* Added support for Nintendo Wii controllers to the HIDAPI driver, and a hint SDL_HINT_JOYSTICK_HIDAPI_WII to control whether this is used
* Added the hint SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED to control whether the player LED should be lit on the Nintendo Wii controllers
-Windows:
-* The RAWINPUT joystick driver is disabled by default, since it's only needed to support more than 4 Xbox controllers, and adds significant complexity to the joystick processing.
-
---------------------------------------------------------------------------
2.24.0:
diff --git a/include/SDL_hints.h b/include/SDL_hints.h
index 3794895..600989e 100644
--- a/include/SDL_hints.h
+++ b/include/SDL_hints.h
@@ -938,11 +938,9 @@ extern "C" {
/**
* \brief A variable controlling whether the RAWINPUT joystick drivers should be used for better handling XInput-capable devices.
*
- * Enabling this hint allows for more than 4 Xbox controllers on Windows, but adds significant complexity to the joystick processing. If you enable this hint and do not use an SDL window in your application, you may need to set the hint SDL_HINT_JOYSTICK_THREAD to "1" to handle joystick input messages.
- *
* This variable can be set to the following values:
- * "0" - RAWINPUT drivers are not used (the default)
- * "1" - RAWINPUT drivers are used
+ * "0" - RAWINPUT drivers are not used
+ * "1" - RAWINPUT drivers are used (the default)
*/
#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 734921c..120a361 100644
--- a/src/joystick/windows/SDL_rawinputjoystick.c
+++ b/src/joystick/windows/SDL_rawinputjoystick.c
@@ -860,7 +860,7 @@ RAWINPUT_JoystickInit(void)
return -1;
}
- if (!SDL_GetHintBoolean(SDL_HINT_JOYSTICK_RAWINPUT, SDL_FALSE)) {
+ if (!SDL_GetHintBoolean(SDL_HINT_JOYSTICK_RAWINPUT, SDL_TRUE)) {
return -1;
}