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.
This commit is contained in:
Kawe Mazidjatari 2023-12-30 17:38:54 +01:00
parent d592bb2241
commit bf5734f5d6

View File

@ -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 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; const float delay = buttonCode == KEY_XBUTTON_BACK ? 1.0f : 0.2f;
KeyInfo_t& keyInfo = g_pKeyInfo[buttonCode]; KeyInfo_t& keyInfo = g_pKeyInfo[buttonCode];