Skip to content

SDL3: SDL_EVENT_MOUSE_MOTION relative movement stops at screen borders #13151

@thrust26

Description

@thrust26

With SDL_SetWindowMouseGrab enabled (and mouse cursor disabled), the invisible mouse cursor will sooner or later hit a screen border. While this should be no problem when checking only the relative mouse movements, the relative movements reported by SDL_EVENT_MOUSE_MOTION are stopping in SDL 3 then too. This is different to SDL 2, where the absolute positions stop at the screen border too, but the relative positions continue to provide the movement values.

E.g. if you have a 800 pixel wide screen, you eventually get 799 as x position. If you move the mouse further right in SDL 2, xrel will continue to return values > 0, while in SDL 3 xrel will be 0.

Windows 10 x64, Direct 3D and OpenGL, SDL 3.2.14

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions