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 - Moving the mouse when in relative mouse mode(SDL_SetRelativeMouseMode(SDL_TRUE)) moves back?
Summary: Moving the mouse when in relative mouse mode(SDL_SetRelativeMouseMode(SDL_TRU...
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: 2.0.5
Hardware: x86_64 Windows 10
: P2 major
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-12 13:59 UTC by superfury
Modified: 2018-04-12 13:59 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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)?