From 37c9e4afa3794fbb3919c96fe011035e75984b58 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 27 Nov 2020 06:03:15 -0800 Subject: [PATCH] Fixed processing WM_INPUT_DEVICE_CHANGE at startup --- src/joystick/windows/SDL_rawinputjoystick.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/joystick/windows/SDL_rawinputjoystick.c b/src/joystick/windows/SDL_rawinputjoystick.c index ca47b61e6..2970187b6 100644 --- a/src/joystick/windows/SDL_rawinputjoystick.c +++ b/src/joystick/windows/SDL_rawinputjoystick.c @@ -631,7 +631,7 @@ static void RAWINPUT_GetPendingDeviceChanges(void) { MSG msg; - while (PeekMessage(&msg, SDL_HelperWindow, WM_INPUT_DEVICE_CHANGE, WM_INPUT_DEVICE_CHANGE, PM_REMOVE)) { + while (PeekMessage(&msg, SDL_HelperWindow, WM_INPUT_DEVICE_CHANGE, WM_INPUT_DEVICE_CHANGE + 1, PM_REMOVE)) { TranslateMessage(&msg); DispatchMessage(&msg); }