annotate src/main/macosx/SDLMain.h @ 4392:2b8c1aea633b SDL-1.2

Fixed bug #898 Jeremiah Morris 2009-12-09 16:07:17 PST No-op GlobalToLocal translations in fullscreen mode On my MacBook Pro running 10.6, I noticed a small upward bias on mouse movement in a fullscreen SDL application. The app uses WarpCursor and GetMouseState in a loop to measure relative movement. I tracked it down to NSWindow's convertBaseToScreen: routine, which added a 2-pixel offset on the Y coordinate instead of the expected (+0,+0) translation. In fullscreen mode, QZ_PrivateWarpCursor() does not translate the desired position through QZ_PrivateGlobalToLocal() before passing it to the Core Graphics system. However, QZ_GetMouseLocation() does call the reverse QZ_PrivateLocalToGlobal() even in fullscreen mode. This asymmetry caused problems each time the mouse was moved.
author Sam Lantinga <slouken@libsdl.org>
date Fri, 11 Dec 2009 15:31:37 +0000
parents 098dfc876bba
children
rev   line source
221
50620ec9c86a *** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents: 194
diff changeset
1 /* SDLMain.m - main entry point for our Cocoa-ized SDL app
50620ec9c86a *** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents: 194
diff changeset
2 Initial Version: Darrell Walisser <dwaliss1@purdue.edu>
50620ec9c86a *** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents: 194
diff changeset
3 Non-NIB-Code & other changes: Max Horn <max@quendi.de>
194
ba9e0fcc2ae2 Oops, back out that SDL_main -> SDLMain conversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
4
ba9e0fcc2ae2 Oops, back out that SDL_main -> SDLMain conversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
5 Feel free to customize this file to suit your needs
ba9e0fcc2ae2 Oops, back out that SDL_main -> SDLMain conversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
6 */
ba9e0fcc2ae2 Oops, back out that SDL_main -> SDLMain conversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
7
4228
098dfc876bba Added header guards for SDLMain.h
Sam Lantinga <slouken@libsdl.org>
parents: 221
diff changeset
8 #ifndef _SDLMain_h_
098dfc876bba Added header guards for SDLMain.h
Sam Lantinga <slouken@libsdl.org>
parents: 221
diff changeset
9 #define _SDLMain_h_
098dfc876bba Added header guards for SDLMain.h
Sam Lantinga <slouken@libsdl.org>
parents: 221
diff changeset
10
194
ba9e0fcc2ae2 Oops, back out that SDL_main -> SDLMain conversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
11 #import <Cocoa/Cocoa.h>
ba9e0fcc2ae2 Oops, back out that SDL_main -> SDLMain conversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
12
ba9e0fcc2ae2 Oops, back out that SDL_main -> SDLMain conversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
13 @interface SDLMain : NSObject
ba9e0fcc2ae2 Oops, back out that SDL_main -> SDLMain conversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
14 @end
4228
098dfc876bba Added header guards for SDLMain.h
Sam Lantinga <slouken@libsdl.org>
parents: 221
diff changeset
15
098dfc876bba Added header guards for SDLMain.h
Sam Lantinga <slouken@libsdl.org>
parents: 221
diff changeset
16 #endif /* _SDLMain_h_ */