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 5310 - SDL_MOUSEMOTION massive random xrel & yrel values when Present(): DEVICELOST
Summary: SDL_MOUSEMOTION massive random xrel & yrel values when Present(): DEVICELOST
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: x86 Windows 10
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-08 15:47 UTC by Anthony @ POW Games
Modified: 2020-10-18 10:35 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony @ POW Games 2020-10-08 15:47:02 UTC
You can force a Present(): DEVICELOST in Windows by Ctrl+Alt+Del and cancelling. When the window is restored there is no harm is done, but...

If the mouse is within the window, a SDL_MOUSEMOTION event is generated with massive random xrel & yrel values. Then another SDL_MOUSEMOTION event is generated with zero xrel & yrel values. The mouse hasn't moved during this time.

Also, alt-tab away from the window and back into the window generates a SDL_MOUSEMOTION event, even though the mouse hasn't moved. But calling SDL_SetWindowFullscreen, which changes the window size and so the position of the mouse, doesn't generate a SDL_MOUSEMOTION event.

This all seems like strange behaviour. Might be related to bug 5154.

I'm not using any relative mouse mode functions. It happens in both full screen and windowed.