Skip to content

Commit db48b53

Browse files
committed
Rename in_joystickUseAnalog to j_useAnalog
To match the prefix of other cvars which affect exclusively joysticks, not gamepads.
1 parent b2cb13d commit db48b53

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/engine/sys/sdl_input.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static Cvar::Cvar<bool> in_nograb("in_nograb", "disable mouse grabbing and curso
5757
static Cvar::Cvar<bool> in_joystick("in_joystick", "enable game controller", Cvar::NONE, false);
5858
static Cvar::Cvar<float> in_joystickThreshold("in_joystickThreshold", "ignore analog stick deflections less than this", Cvar::NONE, 0.15);
5959
static Cvar::Cvar<int> in_joystickNo("in_joystickNo", "which game controller to use", Cvar::NONE, 0);
60-
static Cvar::Cvar<bool> in_joystickUseAnalog("in_joystickUseAnalog", "something about joystick control style", Cvar::NONE, false);
60+
static Cvar::Cvar<bool> j_useAnalog("j_useAnalog", "something about joystick control style", Cvar::NONE, false);
6161
static Cvar::Cvar<float> in_gameControllerTriggerDeadzone("in_gameControllerTriggerDeadzone", "how far trigger must be pulled for key down event", Cvar::NONE, 0.5);
6262

6363
static SDL_Window *window = nullptr;
@@ -642,7 +642,7 @@ static void IN_InitJoystick()
642642
controllerLog.Verbose( "Hats: %d", SDL_GetNumJoystickHats( stick ) );
643643
controllerLog.Verbose( "Buttons: %d", SDL_GetNumJoystickButtons( stick ) );
644644
controllerLog.Verbose( "Balls: %d", SDL_GetNumJoystickBalls( stick ) );
645-
controllerLog.Verbose( "Use Analog: %s", in_joystickUseAnalog.Get() ? "Yes" : "No" );
645+
controllerLog.Verbose( "Use Analog: %s", j_useAnalog.Get() ? "Yes" : "No" );
646646
controllerLog.Verbose( "Use SDL GameController mappings: %s", gamepad ? "Yes" : "No" );
647647

648648
SDL_GamepadEventsEnabled();
@@ -895,7 +895,7 @@ static void IN_JoyMove()
895895
{
896896
Sint16 axis = SDL_GetJoystickAxis( stick, i );
897897

898-
if ( !in_joystickUseAnalog.Get() )
898+
if ( !j_useAnalog.Get() )
899899
{
900900
float f = ( ( float ) axis ) / 32767.0f;
901901

0 commit comments

Comments
 (0)