Skip to content

Commit

Permalink
- fixed doublebind check with automap.
Browse files Browse the repository at this point in the history
When no doublebinds get passed to C_DoKey it may not set the doubleclick flag.
For the automap C_DoKey gets called twice, once with the automap bindings and once with the regular bindings and doubleclicks.
  • Loading branch information
coelckers committed Sep 15, 2023
1 parent 7f7edc4 commit b082c50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/console/c_bind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ bool C_DoKey (event_t *ev, FKeyBindings *binds, FKeyBindings *doublebinds)
if (ev->type == EV_KeyDown)
{ // Key pressed for a normal press
binding = binds->GetBinding(ev->data1);
DClickTime[ev->data1] = nowtime + 571;
if (doublebinds != nullptr) DClickTime[ev->data1] = nowtime + 571;
}
else if (doublebinds != nullptr && DClicked[ev->data1])
{ // Key released from a double click
Expand Down

0 comments on commit b082c50

Please sign in to comment.