From 980c379a0be367a5da7449ecc00b248bbe06cec1 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 11 Feb 2024 17:56:44 -0800 Subject: [PATCH] Renamed SDL_HINT_LINUX_JOYSTICK_CLASSIC to SDL_HINT_JOYSTICK_LINUX_CLASSIC --- build-scripts/SDL_migration.cocci | 4 ++++ docs/README-migration.md | 1 + include/SDL3/SDL_hints.h | 2 +- include/SDL3/SDL_oldnames.h | 2 ++ src/joystick/linux/SDL_sysjoystick.c | 2 +- 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/build-scripts/SDL_migration.cocci b/build-scripts/SDL_migration.cocci index 8437d2394..013b8ad44 100644 --- a/build-scripts/SDL_migration.cocci +++ b/build-scripts/SDL_migration.cocci @@ -3032,3 +3032,7 @@ typedef SDL_version, SDL_Version; @@ - SDL_HINT_LINUX_HAT_DEADZONES + SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES +@@ +@@ +- SDL_HINT_LINUX_JOYSTICK_CLASSIC ++ SDL_HINT_JOYSTICK_LINUX_CLASSIC diff --git a/docs/README-migration.md b/docs/README-migration.md index db5e61f75..9084d7e9e 100644 --- a/docs/README-migration.md +++ b/docs/README-migration.md @@ -731,6 +731,7 @@ The following hints have been renamed: * SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE => SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE * SDL_HINT_LINUX_DIGITAL_HATS => SDL_HINT_JOYSTICK_LINUX_DIGITAL_HATS * SDL_HINT_LINUX_HAT_DEADZONES => SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES +* SDL_HINT_LINUX_JOYSTICK_CLASSIC => SDL_HINT_JOYSTICK_LINUX_CLASSIC ## SDL_init.h diff --git a/include/SDL3/SDL_hints.h b/include/SDL3/SDL_hints.h index 9034f0a33..f6ce6bd03 100644 --- a/include/SDL3/SDL_hints.h +++ b/include/SDL3/SDL_hints.h @@ -1210,7 +1210,7 @@ extern "C" { * * This hint should be set before SDL is initialized. */ -#define SDL_HINT_LINUX_JOYSTICK_CLASSIC "SDL_LINUX_JOYSTICK_CLASSIC" +#define SDL_HINT_JOYSTICK_LINUX_CLASSIC "SDL_JOYSTICK_LINUX_CLASSIC" /** * A variable controlling whether joysticks on Linux adhere to their HID-defined deadzones or return unfiltered values. diff --git a/include/SDL3/SDL_oldnames.h b/include/SDL3/SDL_oldnames.h index 65ee871a1..9ce2ec43b 100644 --- a/include/SDL3/SDL_oldnames.h +++ b/include/SDL3/SDL_oldnames.h @@ -286,6 +286,7 @@ #define SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE #define SDL_HINT_LINUX_DIGITAL_HATS SDL_HINT_JOYSTICK_LINUX_DIGITAL_HATS #define SDL_HINT_LINUX_HAT_DEADZONES SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES +#define SDL_HINT_LINUX_JOYSTICK_CLASSIC SDL_HINT_JOYSTICK_LINUX_CLASSIC /* ##SDL_joystick.h */ #define SDL_JOYSTICK_TYPE_GAMECONTROLLER SDL_JOYSTICK_TYPE_GAMEPAD @@ -766,6 +767,7 @@ #define SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE_renamed_SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE #define SDL_HINT_LINUX_DIGITAL_HATS SDL_HINT_LINUX_DIGITAL_HATS_renamed_SDL_HINT_JOYSTICK_LINUX_DIGITAL_HATS #define SDL_HINT_LINUX_HAT_DEADZONES SDL_HINT_LINUX_HAT_DEADZONES_renamed_SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES +#define SDL_HINT_LINUX_JOYSTICK_CLASSIC SDL_HINT_LINUX_JOYSTICK_CLASSIC_renamed_SDL_HINT_JOYSTICK_LINUX_CLASSIC /* ##SDL_joystick.h */ #define SDL_JOYSTICK_TYPE_GAMECONTROLLER SDL_JOYSTICK_TYPE_GAMECONTROLLER_renamed_SDL_JOYSTICK_TYPE_GAMEPAD diff --git a/src/joystick/linux/SDL_sysjoystick.c b/src/joystick/linux/SDL_sysjoystick.c index 488fbebe2..8e61efeb6 100644 --- a/src/joystick/linux/SDL_sysjoystick.c +++ b/src/joystick/linux/SDL_sysjoystick.c @@ -991,7 +991,7 @@ static int LINUX_JoystickInit(void) { const char *devices = SDL_GetHint(SDL_HINT_JOYSTICK_DEVICE); - SDL_classic_joysticks = SDL_GetHintBoolean(SDL_HINT_LINUX_JOYSTICK_CLASSIC, SDL_FALSE); + SDL_classic_joysticks = SDL_GetHintBoolean(SDL_HINT_JOYSTICK_LINUX_CLASSIC, SDL_FALSE); enumeration_method = ENUMERATION_UNSET;