| Summary: | COMPAT: SDL_WarpMouse doesn't work with a non null viewport | ||
|---|---|---|---|
| Product: | SDL | Reporter: | bastien.bouclet |
| Component: | events | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | x86 | ||
| OS: | All | ||
Self-closing since compat has been removed. |
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); }