Mercurial > sdl-ios-xcode
annotate docs/html/sdljoystickgethat.html @ 983:7f08bd66f1ca
Date: Fri, 19 Nov 2004 06:23:53 -0800 (PST)
From: Eric Wing
Subject: OS X Mouse inversion problem fix (again)
Here's yet another patch for the OS X mouse inversion
problem. This should fix the problem once and for all.
I know I've said this before, but *This time for
sure!* :)
If you recall, my last patch broke the non-OpenGL
windowed code and caused the inversion to occur there
instead. Max submitted a patch that partially reverted
the changes back which included the os version hack
which is currently the most recent CVS.
Aaron Sullivan identified and reported to the mailing
list the other day, that the last partial regression
of the code broke OS X 10.2. Looking over the results,
I'm thinking that I was slightly more successful than
I thought at unifying the code. I think I was trying
to unify the code base for OpenGL and non-OpenGL
windowed modes for all versions of the OS. It looks
like I failed at at unifying the OpenGL and non-OpenGL
code, but I did succeed at unifying the OS versions.
Thus, we no longer need the hack for the OS version
checks. The partial regression still included an OS
check which is what broke things for < 10.3.
Attached is the patch for SDL_QuartzWM.m. It basically
is a half-line change that removes one of the two
checks that decides if the mouse coordinates need to
be inverted, i.e:
if (system_version >= 0x1030 &&
(SDL_VideoSurface->flags & SDL_OPENGL) )
becomes this:
if(SDL_VideoSurface->flags & SDL_OPENGL)
With Aaron's outstanding help, we have collectively
tested:
windowed OpenGL
windowed non-OpenGL
fullscreen OpenGL
fullscreen non-OpenGL
under OS X 10.2 (Jaguar), 10.3 (Panther), and 10.4
(Tiger).
We don't have access to 10.0 or 10.1, but since the
original problem didn't materialize until 10.3, I'm
hopeful that testing 10.2 is sufficient. And now that
the code is uniform, I'm also hoping we'll be safe
moving forward to deal with future revisions of the OS
with this issue.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 21 Nov 2004 00:57:47 +0000 |
parents | 355632dca928 |
children |
rev | line source |
---|---|
0 | 1 <HTML |
2 ><HEAD | |
3 ><TITLE | |
4 >SDL_JoystickGetHat</TITLE | |
5 ><META | |
6 NAME="GENERATOR" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
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="UP" | |
13 TITLE="Joystick" | |
14 HREF="joystick.html"><LINK | |
15 REL="PREVIOUS" | |
16 TITLE="SDL_JoystickGetAxis" | |
17 HREF="sdljoystickgetaxis.html"><LINK | |
18 REL="NEXT" | |
19 TITLE="SDL_JoystickGetButton" | |
20 HREF="sdljoystickgetbutton.html"></HEAD | |
21 ><BODY | |
22 CLASS="REFENTRY" | |
23 BGCOLOR="#FFF8DC" | |
24 TEXT="#000000" | |
25 LINK="#0000ee" | |
26 VLINK="#551a8b" | |
27 ALINK="#ff0000" | |
28 ><DIV | |
29 CLASS="NAVHEADER" | |
30 ><TABLE | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
31 SUMMARY="Header navigation table" |
0 | 32 WIDTH="100%" |
33 BORDER="0" | |
34 CELLPADDING="0" | |
35 CELLSPACING="0" | |
36 ><TR | |
37 ><TH | |
38 COLSPAN="3" | |
39 ALIGN="center" | |
40 >SDL Library Documentation</TH | |
41 ></TR | |
42 ><TR | |
43 ><TD | |
44 WIDTH="10%" | |
45 ALIGN="left" | |
46 VALIGN="bottom" | |
47 ><A | |
48 HREF="sdljoystickgetaxis.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
49 ACCESSKEY="P" |
0 | 50 >Prev</A |
51 ></TD | |
52 ><TD | |
53 WIDTH="80%" | |
54 ALIGN="center" | |
55 VALIGN="bottom" | |
56 ></TD | |
57 ><TD | |
58 WIDTH="10%" | |
59 ALIGN="right" | |
60 VALIGN="bottom" | |
61 ><A | |
62 HREF="sdljoystickgetbutton.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
63 ACCESSKEY="N" |
0 | 64 >Next</A |
65 ></TD | |
66 ></TR | |
67 ></TABLE | |
68 ><HR | |
69 ALIGN="LEFT" | |
70 WIDTH="100%"></DIV | |
71 ><H1 | |
72 ><A | |
73 NAME="SDLJOYSTICKGETHAT" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
74 ></A |
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
75 >SDL_JoystickGetHat</H1 |
0 | 76 ><DIV |
77 CLASS="REFNAMEDIV" | |
78 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
79 NAME="AEN6358" |
0 | 80 ></A |
81 ><H2 | |
82 >Name</H2 | |
83 >SDL_JoystickGetHat -- Get the current state of a joystick hat</DIV | |
84 ><DIV | |
85 CLASS="REFSYNOPSISDIV" | |
86 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
87 NAME="AEN6361" |
0 | 88 ></A |
89 ><H2 | |
90 >Synopsis</H2 | |
91 ><DIV | |
92 CLASS="FUNCSYNOPSIS" | |
93 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
94 NAME="AEN6362" |
0 | 95 ></A |
96 ><P | |
97 ></P | |
98 ><PRE | |
99 CLASS="FUNCSYNOPSISINFO" | |
100 >#include "SDL.h"</PRE | |
101 ><P | |
102 ><CODE | |
103 ><CODE | |
104 CLASS="FUNCDEF" | |
105 >Uint8 <B | |
106 CLASS="FSFUNC" | |
107 >SDL_JoystickGetHat</B | |
108 ></CODE | |
109 >(SDL_Joystick *joystick, int hat);</CODE | |
110 ></P | |
111 ><P | |
112 ></P | |
113 ></DIV | |
114 ></DIV | |
115 ><DIV | |
116 CLASS="REFSECT1" | |
117 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
118 NAME="AEN6368" |
0 | 119 ></A |
120 ><H2 | |
121 >Description</H2 | |
122 ><P | |
123 >SDL_JoystickGetHat returns the current state of the given <TT | |
124 CLASS="PARAMETER" | |
125 ><I | |
126 >hat</I | |
127 ></TT | |
128 > on the given <TT | |
129 CLASS="PARAMETER" | |
130 ><I | |
131 >joystick</I | |
132 ></TT | |
133 >.</P | |
134 ></DIV | |
135 ><DIV | |
136 CLASS="REFSECT1" | |
137 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
138 NAME="AEN6373" |
0 | 139 ></A |
140 ><H2 | |
141 >Return Value</H2 | |
142 ><P | |
143 >The current state is returned as a Uint8 which is defined as an OR'd combination of one or more of the following</P | |
144 ><P | |
145 ></P | |
146 ><TABLE | |
147 BORDER="0" | |
148 ><TBODY | |
149 ><TR | |
150 ><TD | |
151 ><TT | |
152 CLASS="LITERAL" | |
153 >SDL_HAT_CENTERED</TT | |
154 ></TD | |
155 ></TR | |
156 ><TR | |
157 ><TD | |
158 ><TT | |
159 CLASS="LITERAL" | |
160 >SDL_HAT_UP</TT | |
161 ></TD | |
162 ></TR | |
163 ><TR | |
164 ><TD | |
165 ><TT | |
166 CLASS="LITERAL" | |
167 >SDL_HAT_RIGHT</TT | |
168 ></TD | |
169 ></TR | |
170 ><TR | |
171 ><TD | |
172 ><TT | |
173 CLASS="LITERAL" | |
174 >SDL_HAT_DOWN</TT | |
175 ></TD | |
176 ></TR | |
177 ><TR | |
178 ><TD | |
179 ><TT | |
180 CLASS="LITERAL" | |
181 >SDL_HAT_LEFT</TT | |
182 ></TD | |
183 ></TR | |
184 ><TR | |
185 ><TD | |
186 ><TT | |
187 CLASS="LITERAL" | |
188 >SDL_HAT_RIGHTUP</TT | |
189 ></TD | |
190 ></TR | |
191 ><TR | |
192 ><TD | |
193 ><TT | |
194 CLASS="LITERAL" | |
195 >SDL_HAT_RIGHTDOWN</TT | |
196 ></TD | |
197 ></TR | |
198 ><TR | |
199 ><TD | |
200 ><TT | |
201 CLASS="LITERAL" | |
202 >SDL_HAT_LEFTUP</TT | |
203 ></TD | |
204 ></TR | |
205 ><TR | |
206 ><TD | |
207 ><TT | |
208 CLASS="LITERAL" | |
209 >SDL_HAT_LEFTDOWN</TT | |
210 ></TD | |
211 ></TR | |
212 ></TBODY | |
213 ></TABLE | |
214 ><P | |
215 ></P | |
216 ></DIV | |
217 ><DIV | |
218 CLASS="REFSECT1" | |
219 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
220 NAME="AEN6395" |
0 | 221 ></A |
222 ><H2 | |
223 >See Also</H2 | |
224 ><P | |
225 ><A | |
226 HREF="sdljoysticknumhats.html" | |
227 ><TT | |
228 CLASS="FUNCTION" | |
229 >SDL_JoystickNumHats</TT | |
230 ></A | |
231 ></P | |
232 ></DIV | |
233 ><DIV | |
234 CLASS="NAVFOOTER" | |
235 ><HR | |
236 ALIGN="LEFT" | |
237 WIDTH="100%"><TABLE | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
238 SUMMARY="Footer navigation table" |
0 | 239 WIDTH="100%" |
240 BORDER="0" | |
241 CELLPADDING="0" | |
242 CELLSPACING="0" | |
243 ><TR | |
244 ><TD | |
245 WIDTH="33%" | |
246 ALIGN="left" | |
247 VALIGN="top" | |
248 ><A | |
249 HREF="sdljoystickgetaxis.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
250 ACCESSKEY="P" |
0 | 251 >Prev</A |
252 ></TD | |
253 ><TD | |
254 WIDTH="34%" | |
255 ALIGN="center" | |
256 VALIGN="top" | |
257 ><A | |
258 HREF="index.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
259 ACCESSKEY="H" |
0 | 260 >Home</A |
261 ></TD | |
262 ><TD | |
263 WIDTH="33%" | |
264 ALIGN="right" | |
265 VALIGN="top" | |
266 ><A | |
267 HREF="sdljoystickgetbutton.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
268 ACCESSKEY="N" |
0 | 269 >Next</A |
270 ></TD | |
271 ></TR | |
272 ><TR | |
273 ><TD | |
274 WIDTH="33%" | |
275 ALIGN="left" | |
276 VALIGN="top" | |
277 >SDL_JoystickGetAxis</TD | |
278 ><TD | |
279 WIDTH="34%" | |
280 ALIGN="center" | |
281 VALIGN="top" | |
282 ><A | |
283 HREF="joystick.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
284 ACCESSKEY="U" |
0 | 285 >Up</A |
286 ></TD | |
287 ><TD | |
288 WIDTH="33%" | |
289 ALIGN="right" | |
290 VALIGN="top" | |
291 >SDL_JoystickGetButton</TD | |
292 ></TR | |
293 ></TABLE | |
294 ></DIV | |
295 ></BODY | |
296 ></HTML | |
297 > |