소스 검색

Reset the keyboard when entering a modal loop on Windows

Fixes https://github.com/libsdl-org/SDL/issues/12876
Sam Lantinga 1 년 전
부모
커밋
da3c864d4c
1개의 변경된 파일과 3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      src/video/windows/SDL_windowsevents.c

+ 3 - 0
src/video/windows/SDL_windowsevents.c

@@ -1823,6 +1823,9 @@ LRESULT CALLBACK WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
             data->initial_size_rect.bottom = data->window->y + data->window->h;
             data->initial_size_rect.bottom = data->window->y + data->window->h;
 
 
             SetTimer(hwnd, (UINT_PTR)SDL_IterateMainCallbacks, USER_TIMER_MINIMUM, NULL);
             SetTimer(hwnd, (UINT_PTR)SDL_IterateMainCallbacks, USER_TIMER_MINIMUM, NULL);
+
+            // Reset the keyboard, as we won't get any key up events during the modal loop
+            SDL_ResetKeyboard();
         }
         }
     } break;
     } break;