From 6aa1498b9818a1258468577d67ee04b7b10fde7f Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 13 Aug 2021 11:03:19 -0700 Subject: [PATCH] This assert wasn't correct, we set the internal grab for mouse relative mode as well. --- src/video/SDL_video.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index d4078c3ec..38e603082 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -2787,11 +2787,7 @@ SDL_SetWindowMouseGrab(SDL_Window * window, SDL_bool grabbed) SDL_bool SDL_GetWindowGrab(SDL_Window * window) { - CHECK_WINDOW_MAGIC(window, SDL_FALSE); - SDL_assert(!_this->grabbed_window || - ((_this->grabbed_window->flags & SDL_WINDOW_MOUSE_GRABBED) != 0) || - ((_this->grabbed_window->flags & SDL_WINDOW_KEYBOARD_GRABBED) != 0)); - return window == _this->grabbed_window; + return (SDL_GetWindowKeyboardGrab(window) || SDL_GetWindowMouseGrab(window)); } SDL_bool