Updating the mouse capture should use the mouse focus window
Fixes https://github.com/libsdl-org/SDL/issues/8974
This commit is contained in:
parent
c1da39a245
commit
e54001b028
@ -1163,7 +1163,7 @@ int SDL_UpdateMouseCapture(SDL_bool force_release)
|
|||||||
if (SDL_GetMessageBoxCount() == 0 &&
|
if (SDL_GetMessageBoxCount() == 0 &&
|
||||||
(mouse->capture_desired || (mouse->auto_capture && GetButtonState(mouse, SDL_FALSE) != 0))) {
|
(mouse->capture_desired || (mouse->auto_capture && GetButtonState(mouse, SDL_FALSE) != 0))) {
|
||||||
if (!mouse->relative_mode) {
|
if (!mouse->relative_mode) {
|
||||||
capture_window = SDL_GetKeyboardFocus();
|
capture_window = mouse->focus;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user