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

Updating the mouse capture should use the mouse focus window

Fixes https://github.com/libsdl-org/SDL/issues/8974
Sam Lantinga 1 éve
szülő
commit
e54001b028
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      src/events/SDL_mouse.c

+ 1 - 1
src/events/SDL_mouse.c

@@ -1163,7 +1163,7 @@ int SDL_UpdateMouseCapture(SDL_bool force_release)
         if (SDL_GetMessageBoxCount() == 0 &&
             (mouse->capture_desired || (mouse->auto_capture && GetButtonState(mouse, SDL_FALSE) != 0))) {
             if (!mouse->relative_mode) {
-                capture_window = SDL_GetKeyboardFocus();
+                capture_window = mouse->focus;
             }
         }
     }