Skip to content

Commit

Permalink
Merge #4479
Browse files Browse the repository at this point in the history
4479:  Fix normal binds (fixes #4477) r=heinrich5991 a=def-

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: def <[email protected]>
  • Loading branch information
bors[bot] and def- authored Dec 19, 2021
2 parents 56aa4d1 + d23bd12 commit 107438b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/game/client/components/binds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,7 @@ bool CBinds::OnInput(IInput::CEvent e)
if(m_aapKeyBindings[0][e.m_Key] && !ret)
{
// When ctrl+shift are pressed (ctrl+shift binds and also the hard-coded ctrl+shift+d, ctrl+shift+g, ctrl+shift+e), ignore other +xxx binds
if(e.m_Flags & IInput::FLAG_PRESS && Mask != ((1 << MODIFIER_CTRL) | (1 << MODIFIER_SHIFT)))
Console()->ExecuteLineStroked(1, m_aapKeyBindings[0][e.m_Key]);
if(e.m_Flags & IInput::FLAG_PRESS && Mask != ((1 << MODIFIER_GUI) | (1 << MODIFIER_SHIFT)))
if(e.m_Flags & IInput::FLAG_PRESS && Mask != ((1 << MODIFIER_CTRL) | (1 << MODIFIER_SHIFT)) && Mask != ((1 << MODIFIER_GUI) | (1 << MODIFIER_SHIFT)))
Console()->ExecuteLineStroked(1, m_aapKeyBindings[0][e.m_Key]);
if(e.m_Flags & IInput::FLAG_RELEASE)
Console()->ExecuteLineStroked(0, m_aapKeyBindings[0][e.m_Key]);
Expand Down
2 changes: 1 addition & 1 deletion src/game/client/components/menus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2613,7 +2613,7 @@ void CMenus::RenderBackground()
bool CMenus::CheckHotKey(int Key) const
{
return m_Popup == POPUP_NONE &&
!Input()->KeyIsPressed(KEY_LSHIFT) && !Input()->KeyIsPressed(KEY_RSHIFT) && !Input()->ModifierIsPressed() && !Input()->KeyIsPressed(KEY_LALT) && // no modifier
!Input()->KeyIsPressed(KEY_LSHIFT) && !Input()->KeyIsPressed(KEY_RSHIFT) && !Input()->ModifierIsPressed() && // no modifier
Input()->KeyIsPressed(Key) && m_pClient->m_GameConsole.IsClosed();
}

Expand Down

0 comments on commit 107438b

Please sign in to comment.