浏览代码

Reset the keyboard state when launching a message box (thanks, Sean!).

Otherwise, pressed keys get stuck.

Fixes Bugzilla #2776.
Ryan C. Gordon 10 年之前
父节点
当前提交
be89fa09ef
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/video/SDL_video.c

+ 1 - 0
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;