Skip to content

Commit

Permalink
Update SDL_mouse.c
Browse files Browse the repository at this point in the history
  • Loading branch information
expikr committed Nov 14, 2024
1 parent 867fe7b commit 39ee4a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/events/SDL_mouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -846,14 +846,14 @@ static void SDL_PrivateSendMouseMotion(Uint64 timestamp, SDL_Window *window, SDL
// Post the event, if desired
if (SDL_EventEnabled(SDL_EVENT_MOUSE_MOTION)) {
if (!relative) {
if (
if ((mouse->relative_mode) ||
(window && (window->flags & SDL_WINDOW_MOUSE_RELATIVE_MODE)) ||
(mouse->focus && (mouse->focus->flags & SDL_WINDOW_MOUSE_RELATIVE_MODE))
) {
if (!mouse->relative_mode_warp_motion) return;
xrel = 0.0f;
yrel = 0.0f;
}
xrel = 0.0f;
yrel = 0.0f;
}
SDL_Event event;
event.type = SDL_EVENT_MOUSE_MOTION;
Expand Down

0 comments on commit 39ee4a1

Please sign in to comment.