mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-05 01:16:26 +00:00
Also restore previous capture window if CaptureMouse() fails
This commit is contained in:
@@ -1052,6 +1052,8 @@ SDL_UpdateMouseCapture(SDL_bool force_release)
|
||||
if (capture_window) {
|
||||
capture_window->flags &= ~SDL_WINDOW_MOUSE_CAPTURE;
|
||||
}
|
||||
mouse->capture_window = previous_capture;
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user