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 1222

Summary: COMPAT: SDL_WarpMouse doesn't work with a non null viewport
Product: SDL Reporter: bastien.bouclet
Component: eventsAssignee: Sam Lantinga <slouken>
Status: RESOLVED INVALID QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: x86   
OS: All   

Description bastien.bouclet 2011-06-12 08:54:25 UTC
The compat implementation of SDL_WarpMouse doesn't use the viewport. Thus the cursor is displayed at the wrong place.

The bug can be fixed by changing the implementation to :

void
SDL_WarpMouse(Uint16 x, Uint16 y)
{
    SDL_WarpMouseInWindow(SDL_VideoWindow, x + SDL_VideoViewport.x, y + SDL_VideoViewport.y);
}
Comment 1 bastien.bouclet 2012-11-17 11:24:02 UTC
Self-closing since compat has been removed.