Subject: Re: Fullscreen Mouse Coordinates 2007-11-06 - By Shawn Erickson
Back On 11/6/07, Scott Brooks <scott@(protected)> wrote: > On my test system, I have the main monitor running at 1024x768, the secondary > monitor running at 1280x1024, and spawning the game on the second monitor, > fullscreen, at 640x480. > > It seems that all of the mouse input events are coming in with Y coords > between 288-768, rather then 0-480. If I change the main monitor to 800x600, > then the Y coords come in between 120-600. > > Is there some initialization order that I've missed or something like that?
You need to consider that mouse coordinates (depending on how you get them) are in global coordinates and that your displays have different origins in this global coordinate space.
The main display (one with menu bar) always has it lower right corner placed at zero in global coordinates secondary displays have different origins based on their arrangement.
-Shawn __ ____ ____ ____ ____ ____ ____ ____ ____ ____ Do not post admin requests to the list. They will be ignored. Mac-games-dev mailing list (Mac-games-dev@(protected)) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/mac-games-dev/junlu%405341.com
This email sent to junlu@(protected)
|
|