Mercurial > sdl-ios-xcode
annotate docs/html/reference.html @ 1192:54aa9aa32327
To: sdl@libsdl.org
From: Christian Walther <cwalther@gmx.ch>
Date: Fri, 18 Nov 2005 23:39:02 +0100
Subject: [SDL] Mouse position bugs on Mac OS X
The attached patch fixes a few bugs in SDL related to the mouse position
in windowed mode on Mac OS X, reproduced using the attached minimal test
program - at least here on 10.3.9, with SDL CVS from today. Could anyone
test whether the bugs exist and are fixed by the patch on 10.2 and 10.4?
1. When using OpenGL, the vertical mouse positions obtained through
events or SDL_GetMouseState() are off by one.
2. When using OpenGL, SDL_WarpMouse() inverts the y coordinate.
3. Clicks on the topmost pixel row of the window are not recognized.
1 and 2 do not occur in non-OpenGL mode, while 3 does. All three only
occur in windowed mode, not in fullscreen.
The cause for 1 and 3 is that in Cocoa, "the location of the mouse"
seems to be defined as "the location of the top left corner of the mouse
pointer's hot pixel" (this is not documented, it's just what I found out
here), which together with the fact that Cocoa's usual y coordinates
start at the bottom and increase upwards means that the y coordinate of
the mouse runs from 1 to h, not from 0 to h-1, in a window of height h.
If it does work on 10.2 and 10.4 (I'll try to test it as soon as I can,
but at the moment all I have at hand is 10.3.9), can this be applied to
the CVS?
-Christian
To: sdl@libsdl.org
From: Christian Walther <cwalther@gmx.ch>
Date: Mon, 28 Nov 2005 10:41:51 +0100
Subject: [SDL] Re: Mouse position bugs on Mac OS X
I wrote:
> I'll try to test it as soon as I can, but at the moment all I have at hand is 10.3.9
So, here are the results of my tests (with patched and unpatched
frameworks compiled with Xcode 1.5 (gcc 3.3) on 10.3.9):
On 10.1.5, my test program doesn't run because of "Undefined symbols:
SDL undefined reference to _CGMainDisplayID expected to be defined in
Carbon". I guess not supporting 10.1 was a deliberate decision then and
that's OK with me.
On 10.2.8, 10.3.9, and 10.4.0, the bugs exist as described in my
original post and are fixed by my patch. That is, there is no difference
between pre/post 10.3 and the patched version works correctly in all
combinations of GL/non-GL and windowed/fullscreen.
I therefore recommend the patch for inclusion.
-Christian
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Mon, 28 Nov 2005 13:58:26 +0000 |
parents | 355632dca928 |
children |
rev | line source |
---|---|
0 | 1 <HTML |
2 ><HEAD | |
3 ><TITLE | |
4 >SDL Reference</TITLE | |
5 ><META | |
6 NAME="GENERATOR" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+ |
0 | 8 "><LINK |
9 REL="HOME" | |
10 TITLE="SDL Library Documentation" | |
11 HREF="index.html"><LINK | |
12 REL="PREVIOUS" | |
13 TITLE="Time Examples" | |
14 HREF="guidetimeexamples.html"><LINK | |
15 REL="NEXT" | |
16 TITLE="General" | |
17 HREF="general.html"></HEAD | |
18 ><BODY | |
19 CLASS="PART" | |
20 BGCOLOR="#FFF8DC" | |
21 TEXT="#000000" | |
22 LINK="#0000ee" | |
23 VLINK="#551a8b" | |
24 ALINK="#ff0000" | |
25 ><DIV | |
26 CLASS="NAVHEADER" | |
27 ><TABLE | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
28 SUMMARY="Header navigation table" |
0 | 29 WIDTH="100%" |
30 BORDER="0" | |
31 CELLPADDING="0" | |
32 CELLSPACING="0" | |
33 ><TR | |
34 ><TH | |
35 COLSPAN="3" | |
36 ALIGN="center" | |
37 >SDL Library Documentation</TH | |
38 ></TR | |
39 ><TR | |
40 ><TD | |
41 WIDTH="10%" | |
42 ALIGN="left" | |
43 VALIGN="bottom" | |
44 ><A | |
45 HREF="guidetimeexamples.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
46 ACCESSKEY="P" |
0 | 47 >Prev</A |
48 ></TD | |
49 ><TD | |
50 WIDTH="80%" | |
51 ALIGN="center" | |
52 VALIGN="bottom" | |
53 ></TD | |
54 ><TD | |
55 WIDTH="10%" | |
56 ALIGN="right" | |
57 VALIGN="bottom" | |
58 ><A | |
59 HREF="general.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
60 ACCESSKEY="N" |
0 | 61 >Next</A |
62 ></TD | |
63 ></TR | |
64 ></TABLE | |
65 ><HR | |
66 ALIGN="LEFT" | |
67 WIDTH="100%"></DIV | |
68 ><DIV | |
69 CLASS="PART" | |
70 ><A | |
71 NAME="REFERENCE" | |
72 ></A | |
73 ><DIV | |
74 CLASS="TITLEPAGE" | |
75 ><H1 | |
76 CLASS="TITLE" | |
77 >II. SDL Reference</H1 | |
78 ><DIV | |
79 CLASS="TOC" | |
80 ><DL | |
81 ><DT | |
82 ><B | |
83 >Table of Contents</B | |
84 ></DT | |
85 ><DT | |
86 >5. <A | |
87 HREF="general.html" | |
88 >General</A | |
89 ></DT | |
90 ><DT | |
91 >6. <A | |
92 HREF="video.html" | |
93 >Video</A | |
94 ></DT | |
95 ><DT | |
96 >7. <A | |
97 HREF="wm.html" | |
98 >Window Management</A | |
99 ></DT | |
100 ><DT | |
101 >8. <A | |
102 HREF="event.html" | |
103 >Events</A | |
104 ></DT | |
105 ><DT | |
106 >9. <A | |
107 HREF="joystick.html" | |
108 >Joystick</A | |
109 ></DT | |
110 ><DT | |
111 >10. <A | |
112 HREF="audio.html" | |
113 >Audio</A | |
114 ></DT | |
115 ><DT | |
116 >11. <A | |
117 HREF="cdrom.html" | |
118 >CD-ROM</A | |
119 ></DT | |
120 ><DT | |
121 >12. <A | |
122 HREF="thread.html" | |
123 >Multi-threaded Programming</A | |
124 ></DT | |
125 ><DT | |
126 >13. <A | |
127 HREF="time.html" | |
128 >Time</A | |
129 ></DT | |
130 ></DL | |
131 ></DIV | |
132 ></DIV | |
133 ></DIV | |
134 ><DIV | |
135 CLASS="NAVFOOTER" | |
136 ><HR | |
137 ALIGN="LEFT" | |
138 WIDTH="100%"><TABLE | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
139 SUMMARY="Footer navigation table" |
0 | 140 WIDTH="100%" |
141 BORDER="0" | |
142 CELLPADDING="0" | |
143 CELLSPACING="0" | |
144 ><TR | |
145 ><TD | |
146 WIDTH="33%" | |
147 ALIGN="left" | |
148 VALIGN="top" | |
149 ><A | |
150 HREF="guidetimeexamples.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
151 ACCESSKEY="P" |
0 | 152 >Prev</A |
153 ></TD | |
154 ><TD | |
155 WIDTH="34%" | |
156 ALIGN="center" | |
157 VALIGN="top" | |
158 ><A | |
159 HREF="index.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
160 ACCESSKEY="H" |
0 | 161 >Home</A |
162 ></TD | |
163 ><TD | |
164 WIDTH="33%" | |
165 ALIGN="right" | |
166 VALIGN="top" | |
167 ><A | |
168 HREF="general.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
169 ACCESSKEY="N" |
0 | 170 >Next</A |
171 ></TD | |
172 ></TR | |
173 ><TR | |
174 ><TD | |
175 WIDTH="33%" | |
176 ALIGN="left" | |
177 VALIGN="top" | |
178 >Time Examples</TD | |
179 ><TD | |
180 WIDTH="34%" | |
181 ALIGN="center" | |
182 VALIGN="top" | |
183 > </TD | |
184 ><TD | |
185 WIDTH="33%" | |
186 ALIGN="right" | |
187 VALIGN="top" | |
188 >General</TD | |
189 ></TR | |
190 ></TABLE | |
191 ></DIV | |
192 ></BODY | |
193 ></HTML | |
194 > |