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 - COMPAT: SDL_WarpMouse doesn't work with a non null viewport
Summary: COMPAT: SDL_WarpMouse doesn't work with a non null viewport
Status: RESOLVED INVALID
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: HG 2.0
Hardware: x86 All
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-12 08:54 UTC by bastien.bouclet
Modified: 2012-11-17 11:24 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 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.