Skip to content

Commit

Permalink
Reset the keyboard state when launching a message box (thanks, Sean!).
Browse files Browse the repository at this point in the history
Otherwise, pressed keys get stuck.

Fixes Bugzilla #2776.
  • Loading branch information
icculus committed May 27, 2015
1 parent 4190854 commit be89fa0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/video/SDL_video.c
Expand Up @@ -3418,6 +3418,7 @@ SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
SDL_CaptureMouse(SDL_FALSE);
SDL_SetRelativeMouseMode(SDL_FALSE);
show_cursor_prev = SDL_ShowCursor(1);
SDL_ResetKeyboard();

if (!buttonid) {
buttonid = &dummybutton;
Expand Down

0 comments on commit be89fa0

Please sign in to comment.