We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4132

Summary: Moving the mouse when in relative mouse mode(SDL_SetRelativeMouseMode(SDL_TRUE)) moves back?
Product: SDL Reporter: superfury
Component: eventsAssignee: Sam Lantinga <slouken>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2    
Version: 2.0.5   
Hardware: x86_64   
OS: Windows 10   

Description superfury 2018-04-12 13:59:49 UTC
When I enable the relative mouse mode using SDL_SetRelativeMouseMode(SDL_TRUE), when I look at reported mouse movement of e.g. moving the mouse down and right, I first see the correct mouse movement(1,1 xrel,yrel and increasing location in .x and .y event), but it's then oddly followed up by a second event reversing the previous one(the same xrel and yrel, but negative). The same kind of behaviour happens in both x and y redirections(negative followed by positive, or positive followed by negative)?

Is that supposed to happen? When setting SDL_SetRelativeMouseMode(SDL_FALSE), it behaves as normal(and works just fine), but moves the mouse around, which I don't want in my case(PC emulator using mouse input and keyboard input, capturing them for emulated input while hiding the mouse)?