mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
CMenusKeyBinder: Fix binding in cases with only a modifier key pressed
This commit is contained in:
parent
2233ca98c1
commit
fff597cd2a
|
@ -52,15 +52,11 @@ bool CMenusKeyBinder::OnInput(IInput::CEvent Event)
|
|||
m_GotKey = true;
|
||||
m_TakeKey = false;
|
||||
|
||||
int Mask = CBinds::GetModifierMask(Input());
|
||||
m_ModifierCombination = 0;
|
||||
while(!(Mask & 1))
|
||||
m_ModifierCombination = CBinds::GetModifierMask(Input());
|
||||
if(m_ModifierCombination == CBinds::GetModifierMaskOfKey(Event.m_Key))
|
||||
{
|
||||
Mask >>= 1;
|
||||
m_ModifierCombination++;
|
||||
}
|
||||
if(CBinds::ModifierMatchesKey(m_ModifierCombination, Event.m_Key))
|
||||
m_ModifierCombination = 0;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue