From bf5734f5d625c4736cc248273622f635d8f53eac Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sat, 30 Dec 2023 17:38:54 +0100 Subject: [PATCH] InputSystem: add note to 'CGame::DispatchKeyEvent()' These are hardcoded delay values for if you want to pick and swap an item from the ground. Perhaps nice to make a cvar and an in-game UI setting for adjusting them. --- src/engine/sys_mainwind.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/engine/sys_mainwind.cpp b/src/engine/sys_mainwind.cpp index 8fb7d3ce..65e59614 100644 --- a/src/engine/sys_mainwind.cpp +++ b/src/engine/sys_mainwind.cpp @@ -123,6 +123,8 @@ void CGame::GetWindowRect(int* const x, int* const y, int* const w, int* const h //----------------------------------------------------------------------------- void CGame::DispatchKeyEvent(const uint64_t currentTick, const ButtonCode_t buttonCode) const { + // Controller 'hold' keys are delayed longer. + // TODO[ AMOS ]: use ConVar's instead? const float delay = buttonCode == KEY_XBUTTON_BACK ? 1.0f : 0.2f; KeyInfo_t& keyInfo = g_pKeyInfo[buttonCode];