diff --git a/build-scripts/SDL_migration.cocci b/build-scripts/SDL_migration.cocci index 8629b97ed1..265b173858 100644 --- a/build-scripts/SDL_migration.cocci +++ b/build-scripts/SDL_migration.cocci @@ -3012,3 +3012,7 @@ typedef SDL_version, SDL_Version; @@ - SDL_HINT_ALLOW_TOPMOST + SDL_HINT_WINDOW_ALLOW_TOPMOST +@@ +@@ +- SDL_HINT_DIRECTINPUT_ENABLED ++ SDL_HINT_JOYSTICK_DIRECTINPUT diff --git a/docs/README-migration.md b/docs/README-migration.md index 80a60ccbf3..a9f4f0b39e 100644 --- a/docs/README-migration.md +++ b/docs/README-migration.md @@ -726,6 +726,7 @@ The following hints have been removed: The following hints have been renamed: * SDL_HINT_ALLOW_TOPMOST => SDL_HINT_WINDOW_ALLOW_TOPMOST +* SDL_HINT_DIRECTINPUT_ENABLED => SDL_HINT_JOYSTICK_DIRECTINPUT ## SDL_init.h diff --git a/include/SDL3/SDL_hints.h b/include/SDL3/SDL_hints.h index 0c024cd96c..efbf75e185 100644 --- a/include/SDL3/SDL_hints.h +++ b/include/SDL3/SDL_hints.h @@ -364,7 +364,7 @@ extern "C" { * * This hint should be set before SDL is initialized. */ -#define SDL_HINT_DIRECTINPUT_ENABLED "SDL_DIRECTINPUT_ENABLED" +#define SDL_HINT_JOYSTICK_DIRECTINPUT "SDL_JOYSTICK_DIRECTINPUT" /** * Override for SDL_GetDisplayUsableBounds() diff --git a/include/SDL3/SDL_oldnames.h b/include/SDL3/SDL_oldnames.h index f19757c4c7..a74573de02 100644 --- a/include/SDL3/SDL_oldnames.h +++ b/include/SDL3/SDL_oldnames.h @@ -281,6 +281,7 @@ /* ##SDL_hints.h */ #define SDL_HINT_ALLOW_TOPMOST SDL_HINT_WINDOW_ALLOW_TOPMOST +#define SDL_HINT_DIRECTINPUT_ENABLED SDL_HINT_JOYSTICK_DIRECTINPUT /* ##SDL_joystick.h */ #define SDL_JOYSTICK_TYPE_GAMECONTROLLER SDL_JOYSTICK_TYPE_GAMEPAD @@ -756,6 +757,7 @@ /* ##SDL_hints.h */ #define SDL_HINT_ALLOW_TOPMOST SDL_HINT_ALLOW_TOPMOST_renamed_SDL_HINT_WINDOW_ALLOW_TOPMOST +#define SDL_HINT_DIRECTINPUT_ENABLED SDL_HINT_DIRECTINPUT_ENABLED_renamed_SDL_HINT_JOYSTICK_DIRECTINPUT /* ##SDL_joystick.h */ #define SDL_JOYSTICK_TYPE_GAMECONTROLLER SDL_JOYSTICK_TYPE_GAMECONTROLLER_renamed_SDL_JOYSTICK_TYPE_GAMEPAD diff --git a/src/haptic/windows/SDL_dinputhaptic.c b/src/haptic/windows/SDL_dinputhaptic.c index 700a8155ea..bcae64c9ed 100644 --- a/src/haptic/windows/SDL_dinputhaptic.c +++ b/src/haptic/windows/SDL_dinputhaptic.c @@ -71,7 +71,7 @@ int SDL_DINPUT_HapticInit(void) return SDL_SetError("Haptic: SubSystem already open."); } - if (!SDL_GetHintBoolean(SDL_HINT_DIRECTINPUT_ENABLED, SDL_TRUE)) { + if (!SDL_GetHintBoolean(SDL_HINT_JOYSTICK_DIRECTINPUT, SDL_TRUE)) { /* In some environments, IDirectInput8_Initialize / _EnumDevices can take a minute even with no controllers. */ return 0; } diff --git a/src/joystick/windows/SDL_dinputjoystick.c b/src/joystick/windows/SDL_dinputjoystick.c index 80a8d66eb3..150f59be22 100644 --- a/src/joystick/windows/SDL_dinputjoystick.c +++ b/src/joystick/windows/SDL_dinputjoystick.c @@ -398,7 +398,7 @@ int SDL_DINPUT_JoystickInit(void) HRESULT result; HINSTANCE instance; - if (!SDL_GetHintBoolean(SDL_HINT_DIRECTINPUT_ENABLED, SDL_TRUE)) { + if (!SDL_GetHintBoolean(SDL_HINT_JOYSTICK_DIRECTINPUT, SDL_TRUE)) { /* In some environments, IDirectInput8_Initialize / _EnumDevices can take a minute even with no controllers. */ dinput = NULL; return 0;