- fixed joystick CVAR use.

This commit is contained in:
Christoph Oelckers 2020-04-08 00:24:16 +02:00
parent 1aa1e62c4d
commit eaf27c2583
4 changed files with 4 additions and 7 deletions

View file

@ -272,7 +272,6 @@ CUSTOM_CVARD(Int, r_fov, 90, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "change the field o
CVARD(Bool, r_horizcenter, false, CVAR_ARCHIVE|CVAR_FRONTEND_BLOOD, "enable/disable centered horizon line") // only present in Blood, maybe add to others?
CVARD(Bool, in_joystick, false, CVAR_ARCHIVE||CVAR_GLOBALCONFIG|CVAR_NOINITCALL, "enables input from the joystick if it is present")
CVARD(Bool, in_mousemode, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "toggles vertical mouse view")
CVAR(Bool, silentmouseaimtoggle, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)

View file

@ -85,7 +85,7 @@ EXTERN_CVAR(Float, vid_brightness)
EXTERN_CVAR(Int, gl_multisample)
EXTERN_CVAR(Int, gl_ssao)
EXTERN_CVAR(Bool, in_joystick)
EXTERN_CVAR(Bool, use_joystick)
EXTERN_CVAR(Int, in_mousebias)
EXTERN_CVAR(Bool, in_mouseflip)
EXTERN_CVAR(Bool, in_mousemode)

View file

@ -50,17 +50,15 @@
// EXTERNAL DATA DECLARATIONS ----------------------------------------------
#if 0
EXTERN_CVAR(Bool, joy_ps2raw)
EXTERN_CVAR(Bool, joy_dinput)
EXTERN_CVAR(Bool, joy_xinput)
#endif
// PUBLIC DATA DEFINITIONS -------------------------------------------------
CUSTOM_CVAR(Bool, use_joystick, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITCALL)
CUSTOM_CVARD(Bool, use_joystick, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITCALL, "enables input from the joystick if it is present")
{
#if 0//def _WIN32
#ifdef _WIN32
joy_ps2raw.Callback();
joy_dinput.Callback();
joy_xinput.Callback();

View file

@ -187,7 +187,7 @@ void CONTROL_GetInput(ControlInfo* info)
inputState.GetMouseDelta(info);
if (in_joystick)
if (use_joystick)
{
// Handle joysticks/game controllers.
float joyaxes[NUM_JOYAXIS];