Forráskód Böngészése

windows: explicitly check whether raw_mouse_enabled is true before handling Windows mouse messages

Sam Lantinga 1 éve
szülő
commit
70b5cd44ec
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      src/video/windows/SDL_windowsevents.c

+ 2 - 2
src/video/windows/SDL_windowsevents.c

@@ -1018,7 +1018,7 @@ LRESULT CALLBACK WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
             }
         }
 
-        if (!mouse->relative_mode || mouse->relative_mode_warp) {
+        if (!data->videodata->raw_mouse_enabled) {
             /* Only generate mouse events for real mouse */
             if (GetMouseMessageSource((ULONG)GetMessageExtraInfo()) != SDL_MOUSE_EVENT_SOURCE_TOUCH &&
                 lParam != data->last_pointer_update) {
@@ -1041,7 +1041,7 @@ LRESULT CALLBACK WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
     case WM_XBUTTONDBLCLK:
     {
         SDL_Mouse *mouse = SDL_GetMouse();
-        if (!mouse->relative_mode || mouse->relative_mode_warp) {
+        if (!data->videodata->raw_mouse_enabled) {
             if (GetMouseMessageSource((ULONG)GetMessageExtraInfo()) != SDL_MOUSE_EVENT_SOURCE_TOUCH &&
                 lParam != data->last_pointer_update) {
                 WIN_CheckWParamMouseButtons(WIN_GetEventTimestamp(), wParam, data, SDL_GLOBAL_MOUSE_ID);