|
|
@@ -1419,7 +1419,13 @@ bool SDL_UpdateRelativeMouseMode(void)
|
|
|
{
|
|
|
SDL_Mouse *mouse = SDL_GetMouse();
|
|
|
SDL_Window *focus = SDL_GetKeyboardFocus();
|
|
|
- bool relative_mode = (focus && (focus->flags & SDL_WINDOW_MOUSE_RELATIVE_MODE));
|
|
|
+ bool relative_mode = false;
|
|
|
+
|
|
|
+ if (focus &&
|
|
|
+ (focus->flags & SDL_WINDOW_MOUSE_RELATIVE_MODE) &&
|
|
|
+ (focus->flags & SDL_WINDOW_MOUSE_FOCUS)) {
|
|
|
+ relative_mode = true;
|
|
|
+ }
|
|
|
|
|
|
if (relative_mode == mouse->relative_mode) {
|
|
|
return true;
|