Skip to content

Commit

Permalink
Fixed OnHold keyboard state
Browse files Browse the repository at this point in the history
SDL2 repeats key events when key is on hold, but the engine was built without this feature in mind
  • Loading branch information
Xottab-DUTY committed Jul 22, 2018
1 parent 091d081 commit 4429129
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/xrEngine/xr_input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ void CInput::KeyUpdate()
switch (event.type)
{
case SDL_KEYDOWN:
if (event.key.repeat)
continue;
KBState[event.key.keysym.scancode] = true;
cbStack.back()->IR_OnKeyboardPress(event.key.keysym.scancode);
break;
Expand Down

0 comments on commit 4429129

Please sign in to comment.