Changed SDL_HINT_ACCEL_AS_JOY to SDL_HINT_ACCELEROMETER_AS_JOYSTICK to be more clear.
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 83c1be2..ae1ed18 100644
--- a/WhatsNew.txt
+++ b/WhatsNew.txt
@@ -41,7 +41,7 @@ Android:
the required runtime version remains at 10, but on such devices joystick
support won't be available).
* Hotplugging support for joysticks
-* Added a hint SDL_HINT_ACCEL_AS_JOY to control whether the accelerometer should be listed as a 3 axis joystick, which it will by default.
+* Added a hint SDL_HINT_ACCELEROMETER_AS_JOYSTICK to control whether the accelerometer should be listed as a 3 axis joystick, which it will by default.
---------------------------------------------------------------------------
diff --git a/include/SDL_hints.h b/include/SDL_hints.h
index 26edca5..9fd9dae 100644
--- a/include/SDL_hints.h
+++ b/include/SDL_hints.h
@@ -244,7 +244,7 @@ extern "C" {
* "0" - List only real joysticks and accept input from them
* "1" - List real joysticks along with the accelerometer as if it were a 3 axis joystick (the default).
*/
-#define SDL_HINT_ACCEL_AS_JOY "SDL_ACCEL_AS_JOY"
+#define SDL_HINT_ACCELEROMETER_AS_JOYSTICK "SDL_ACCELEROMETER_AS_JOYSTICK"
/**
diff --git a/src/joystick/android/SDL_sysjoystick.c b/src/joystick/android/SDL_sysjoystick.c
index ce49fa9..422c5f5 100644
--- a/src/joystick/android/SDL_sysjoystick.c
+++ b/src/joystick/android/SDL_sysjoystick.c
@@ -379,11 +379,11 @@ Android_RemoveJoystick(int device_id)
int
SDL_SYS_JoystickInit(void)
{
- const char *env;
+ const char *hint;
SDL_SYS_JoystickDetect();
- env = SDL_GetHint(SDL_HINT_ACCEL_AS_JOY);
- if (!env || SDL_atoi(env)) {
+ hint = SDL_GetHint(SDL_HINT_ACCELEROMETER_AS_JOYSTICK);
+ if (!hint || SDL_atoi(hint)) {
/* Default behavior, accelerometer as joystick */
Android_AddJoystick(ANDROID_ACCELEROMETER_DEVICE_ID, ANDROID_ACCELEROMETER_NAME, SDL_TRUE, 0, 3, 0, 0);
}