Changed SDL_HINT_ACCEL_AS_JOY to SDL_HINT_ACCELEROMETER_AS_JOYSTICK to be more clear.
authorSam Lantinga <slouken@libsdl.org>
Sat, 01 Mar 2014 12:21:15 -0800
changeset 82748b1f8feb42a6
parent 8273 bdfea8962bcf
child 8275 39b104a55d19
Changed SDL_HINT_ACCEL_AS_JOY to SDL_HINT_ACCELEROMETER_AS_JOYSTICK to be more clear.
WhatsNew.txt
include/SDL_hints.h
src/joystick/android/SDL_sysjoystick.c
     1.1 --- a/WhatsNew.txt	Sat Mar 01 11:42:12 2014 -0800
     1.2 +++ b/WhatsNew.txt	Sat Mar 01 12:21:15 2014 -0800
     1.3 @@ -41,7 +41,7 @@
     1.4    the required runtime version remains at 10, but on such devices joystick 
     1.5    support won't be available).
     1.6  * Hotplugging support for joysticks
     1.7 -* 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.
     1.8 +* 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.
     1.9  
    1.10  
    1.11  ---------------------------------------------------------------------------
     2.1 --- a/include/SDL_hints.h	Sat Mar 01 11:42:12 2014 -0800
     2.2 +++ b/include/SDL_hints.h	Sat Mar 01 12:21:15 2014 -0800
     2.3 @@ -244,7 +244,7 @@
     2.4   *    "0"       - List only real joysticks and accept input from them
     2.5   *    "1"       - List real joysticks along with the accelerometer as if it were a 3 axis joystick (the default).
     2.6   */
     2.7 -#define SDL_HINT_ACCEL_AS_JOY "SDL_ACCEL_AS_JOY"
     2.8 +#define SDL_HINT_ACCELEROMETER_AS_JOYSTICK "SDL_ACCELEROMETER_AS_JOYSTICK"
     2.9  
    2.10  
    2.11  /**
     3.1 --- a/src/joystick/android/SDL_sysjoystick.c	Sat Mar 01 11:42:12 2014 -0800
     3.2 +++ b/src/joystick/android/SDL_sysjoystick.c	Sat Mar 01 12:21:15 2014 -0800
     3.3 @@ -379,11 +379,11 @@
     3.4  int
     3.5  SDL_SYS_JoystickInit(void)
     3.6  {
     3.7 -    const char *env;
     3.8 +    const char *hint;
     3.9      SDL_SYS_JoystickDetect();
    3.10      
    3.11 -    env = SDL_GetHint(SDL_HINT_ACCEL_AS_JOY);
    3.12 -    if (!env || SDL_atoi(env)) {
    3.13 +    hint = SDL_GetHint(SDL_HINT_ACCELEROMETER_AS_JOYSTICK);
    3.14 +    if (!hint || SDL_atoi(hint)) {
    3.15          /* Default behavior, accelerometer as joystick */
    3.16          Android_AddJoystick(ANDROID_ACCELEROMETER_DEVICE_ID, ANDROID_ACCELEROMETER_NAME, SDL_TRUE, 0, 3, 0, 0);
    3.17      }