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 654 - SDL SVN 1.3 2008-12-09, win32 platform, mouse coordinates calculated incorrectly in windowed mode
Summary: SDL SVN 1.3 2008-12-09, win32 platform, mouse coordinates calculated incorrec...
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: HG 2.0
Hardware: x86 Windows (All)
: P2 blocker
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-10 01:30 UTC by Andrew
Modified: 2009-01-02 22:07 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 Andrew 2008-12-10 01:30:05 UTC
Mouse coordinates in windowed mode calculated incorrectly.
Instead of be relative to window content it occurs as screen (desktop) coordinates.

Fast woraround is change SDL_win32events.c and add at line 245 after:
  GetCursorPos(&point);
new line with contents:
  ScreenToClient(hwnd, &point);

This converts screen coordinates back to local.
Comment 1 Sam Lantinga 2009-01-02 22:07:37 UTC
Fixed, thanks!

Committed revision 4328.