From 5dce8c748f3377a1f8d8985092ed3f99d26990a0 Mon Sep 17 00:00:00 2001
From: Petar Popovic <[EMAIL REDACTED]>
Date: Thu, 13 Feb 2025 17:05:17 +0100
Subject: [PATCH] SDL_GetRelativeMouseState(): Get relative mouse position also
when relative mouse mode is disabled
---
src/events/SDL_mouse.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c
index 0369b1091d0f2..69f4228fe5801 100644
--- a/src/events/SDL_mouse.c
+++ b/src/events/SDL_mouse.c
@@ -748,10 +748,8 @@ static void SDL_PrivateSendMouseMotion(Uint64 timestamp, SDL_Window *window, SDL
// modify internal state
{
- if (relative) {
- mouse->x_accu += xrel;
- mouse->y_accu += yrel;
- }
+ mouse->x_accu += xrel;
+ mouse->y_accu += yrel;
if (relative && mouse->has_position) {
mouse->x += xrel;