Commit be89fa09efb6954255f9f1caf57fd1762e3df3ed

Ryan C. Gordon 2015-05-26T20:49:27

Reset the keyboard state when launching a message box (thanks, Sean!). Otherwise, pressed keys get stuck. Fixes Bugzilla #2776.

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index dbc3094..2e168de 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -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;