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

Summary: SDL_MOUSEMOTION massive random xrel & yrel values when Present(): DEVICELOST
Product: SDL Reporter: Anthony @ POW Games <ant>
Component: videoAssignee: Sam Lantinga <slouken>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: sezeroz
Version: HG 2.0   
Hardware: x86   
OS: Windows 10   

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.