Merge pull request #8700 from Robyt3/Binds-Repeat-Fix

Fix binds not being repeated when key held down
This commit is contained in:
Dennis Felsing 2024-08-08 16:37:18 +00:00 committed by GitHub
commit 7added6eef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -150,6 +150,16 @@ bool CBinds::OnInput(const IInput::CEvent &Event)
Handled = true; Handled = true;
} }
} }
else
{
// Repeat active bind while key is held down
// Have to check for nullptr again because the previous execute can unbind itself
if(m_aapKeyBindings[ActiveBind->m_ModifierMask][ActiveBind->m_Key])
{
Console()->ExecuteLineStroked(1, m_aapKeyBindings[ActiveBind->m_ModifierMask][ActiveBind->m_Key]);
}
Handled = true;
}
} }
if(Event.m_Flags & IInput::FLAG_RELEASE) if(Event.m_Flags & IInput::FLAG_RELEASE)