From 44182002afcc9fdeca93c8296185258d374f6513 Mon Sep 17 00:00:00 2001 From: terencehill Date: Mon, 8 May 2017 18:06:19 +0200 Subject: [PATCH] Show joystick binds in the HUD only when a joystick is active (detected and enabled) --- qcsrc/client/main.qc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index 91254e7ad..a098bd7f9 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -1232,7 +1232,7 @@ string _getcommandkey(string cmd_name, string command, bool forcename) keys = db_get(binddb, command); if (keys == "") { - bool joy_detected = cvar("joy_detected"); + bool joy_active = cvar("joy_active"); n = tokenize(findkeysforcommand(command, 0)); // uses '...' strings for(j = 0; j < n; ++j) { @@ -1240,7 +1240,7 @@ string _getcommandkey(string cmd_name, string command, bool forcename) if(k != -1) { string key = keynumtostring(k); - if(!joy_detected && substring(key, 0, 3) == "JOY") + if(!joy_active && substring(key, 0, 3) == "JOY") continue; if (keys == "") -- 2.39.2