mirror of https://github.com/encounter/SDL.git
Also restore previous capture window if CaptureMouse() fails
This commit is contained in:
parent
7044452dd6
commit
f9a9d3c8d4
|
@ -1052,6 +1052,8 @@ SDL_UpdateMouseCapture(SDL_bool force_release)
|
||||||
if (capture_window) {
|
if (capture_window) {
|
||||||
capture_window->flags &= ~SDL_WINDOW_MOUSE_CAPTURE;
|
capture_window->flags &= ~SDL_WINDOW_MOUSE_CAPTURE;
|
||||||
}
|
}
|
||||||
|
mouse->capture_window = previous_capture;
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue