Fix binds not being repeated when key held down

Closes #8699. Regression from #8685.
This commit is contained in:
Robert Müller 2024-08-08 18:04:40 +02:00
parent 49bef9c453
commit 645a00551b

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)