Also restore previous capture window if CaptureMouse() fails
parent
7044452dd6
commit
f9a9d3c8d4
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue