Skip to content

Commit 14dffcc

Browse files
authored
client: register joysupported cvar to be able to use gamepads on HL25
1 parent 6be11c0 commit 14dffcc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cl_dll/input_goldsource.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1199,7 +1199,7 @@ void GoldSourceInput::Joy_AdvancedUpdate(void)
11991199
dwTemp = (DWORD) joy_advaxisz->value;
12001200
dwAxisMap[JOY_AXIS_Z] = dwTemp & 0x0000000f;
12011201
dwControlMap[JOY_AXIS_Z] = dwTemp & JOY_RELATIVE_AXIS;
1202-
dwTemp = (DWORD) joy_advaxisr->value;
1202+
dwTemp = (DWORD) joy_advaxisr->value;I've ran Half-Life under debugger and set watchpoint to joypitchsensitivity->value address. It gets changed by ClientDLL_CreateMove.
12031203
dwAxisMap[JOY_AXIS_R] = dwTemp & 0x0000000f;
12041204
dwControlMap[JOY_AXIS_R] = dwTemp & JOY_RELATIVE_AXIS;
12051205
dwTemp = (DWORD) joy_advaxisu->value;
@@ -1614,6 +1614,11 @@ void GoldSourceInput::IN_Init (void)
16141614
joy_wwhack1 = gEngfuncs.pfnRegisterVariable ( "joywwhack1", "0.0", 0 );
16151615
joy_wwhack2 = gEngfuncs.pfnRegisterVariable ( "joywwhack2", "0.0", 0 );
16161616
1617+
// HL25 checks this cvar and if it doesn't exist or set to zero
1618+
// it will lock any usage of gamepads
1619+
// see: https://github.com/ValveSoftware/halflife/issues/3621
1620+
gEngfuncs.pfnRegisterVariable( "joysupported", 1, 0 );
1621+
16171622
m_customaccel = gEngfuncs.pfnRegisterVariable ( "m_customaccel", "0", FCVAR_ARCHIVE );
16181623
m_customaccel_scale = gEngfuncs.pfnRegisterVariable ( "m_customaccel_scale", "0.04", FCVAR_ARCHIVE );
16191624
m_customaccel_max = gEngfuncs.pfnRegisterVariable ( "m_customaccel_max", "0", FCVAR_ARCHIVE );

0 commit comments

Comments
 (0)