From 810cd6042b4a82e31bc707f0efc8de548fa0d608 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 21 Dec 2024 21:32:41 +0300 Subject: [PATCH] client: register joysupported cvar to be able to use gamepads on HL25 (#496) --- cl_dll/input_goldsource.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cl_dll/input_goldsource.cpp b/cl_dll/input_goldsource.cpp index d3517b288..26567c0a6 100644 --- a/cl_dll/input_goldsource.cpp +++ b/cl_dll/input_goldsource.cpp @@ -1614,6 +1614,11 @@ void GoldSourceInput::IN_Init (void) joy_wwhack1 = gEngfuncs.pfnRegisterVariable ( "joywwhack1", "0.0", 0 ); joy_wwhack2 = gEngfuncs.pfnRegisterVariable ( "joywwhack2", "0.0", 0 ); + // HL25 checks this cvar and if it doesn't exist or set to zero + // it will lock any usage of gamepads + // see: https://github.com/ValveSoftware/halflife/issues/3621 + gEngfuncs.pfnRegisterVariable( "joysupported", "1", 0 ); + m_customaccel = gEngfuncs.pfnRegisterVariable ( "m_customaccel", "0", FCVAR_ARCHIVE ); m_customaccel_scale = gEngfuncs.pfnRegisterVariable ( "m_customaccel_scale", "0.04", FCVAR_ARCHIVE ); m_customaccel_max = gEngfuncs.pfnRegisterVariable ( "m_customaccel_max", "0", FCVAR_ARCHIVE );