Mercurial > sdl-ios-xcode
annotate docs/html/sdlvideoinfo.html @ 4167:a6f635e5eaa6 SDL-1.2
Fixed bug #611
From Tim Angus 2008-08-12 11:18:06
I'm one of the maintainers of ioquake3.org, an updated version of the
Quake 3 engine. Relatively recently, we moved ioq3 to use SDL as a
replacement for 95% of the platform specific code that was there. On the
whole it's doing a great job but unfortunately since the move we've been
getting complaints about the quality of the mouse input on the Windows
platform to the point where for many the game is unplayable. Put in
other terms, the current stable SDL 1.2 is basically not fit for purpose
if you need high quality mouse input as you do in a first person shooter.
Over the weekend I decided to pull my finger out and actually figure out
what's going on. There are basically two major problems. Firstly, when
using the "windib" driver, mouse input is gathered via the WM_MOUSEMOVE
message. Googling for this indicates that often this is known to result
in "spurious" and/or "missing" mouse movement events; this is the
primary cause of the poor mouse input. The second problem is that the
"directx" driver does not work at all in combination with OpenGL meaning
that you can't use DirectInput if your application also uses OpenGL. In
other words you're locked into using the "windib" driver and its poor
mouse input.
In order to address these problems I've done the following:
* Remove WM_MOUSEMOVE based motion event generation and replace with
calls to GetCursorPos which seems much more reliable. In order to
achieve this I've moved mouse motion out into a separate function that
is called once per DIB_PumpEvents.
* Remove the restriction on the "directx" driver being inoperable in
combination with OpenGL. There is a bug for this issues that I've
hijacked to a certain extent
(http://bugzilla.libsdl.org/show_bug.cgi?id=265). I'm the first to admit
I don't really understand why this restriction is there in the first
place. The commit message for the bug fix that introduced this
restriction (r581) isn't very elaborate and I couldn't see any other bug
tracking the issue. If anyone has more information on the bug that was
avoided by r581 it would be helpful as I/someone could then look into
addressing the problem without disabling the "directx" driver.
* I've also removed the restriction on not being allowed to use
DirectInput in windowed mode. I couldn't see any reason for this, at
least not from our perspective. I have my suspicions that it'll be
something like matching up the cursor with the mouse coordinates...
* I bumped up the DirectInput API used to version 7 in order to get
access to mouse buttons 4-7. I've had to inject a little bit of the DX7
headers into SDL there as the MinGW ones aren't up to date in this respect.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 02 Apr 2009 04:43:36 +0000 |
parents | 355632dca928 |
children |
rev | line source |
---|---|
0 | 1 <HTML |
2 ><HEAD | |
3 ><TITLE | |
4 >SDL_VideoInfo</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="Video" | |
14 HREF="video.html"><LINK | |
15 REL="PREVIOUS" | |
16 TITLE="SDL_Surface" | |
17 HREF="sdlsurface.html"><LINK | |
18 REL="NEXT" | |
19 TITLE="SDL_Overlay" | |
20 HREF="sdloverlay.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="sdlsurface.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="sdloverlay.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="SDLVIDEOINFO" | |
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_VideoInfo</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="AEN3390" |
0 | 80 ></A |
81 ><H2 | |
82 >Name</H2 | |
83 >SDL_VideoInfo -- Video Target information</DIV | |
84 ><DIV | |
85 CLASS="REFSECT1" | |
86 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
87 NAME="AEN3393" |
0 | 88 ></A |
89 ><H2 | |
90 >Structure Definition</H2 | |
91 ><PRE | |
92 CLASS="PROGRAMLISTING" | |
93 >typedef struct{ | |
94 Uint32 hw_available:1; | |
95 Uint32 wm_available:1; | |
96 Uint32 blit_hw:1; | |
97 Uint32 blit_hw_CC:1; | |
98 Uint32 blit_hw_A:1; | |
99 Uint32 blit_sw:1; | |
100 Uint32 blit_sw_CC:1; | |
101 Uint32 blit_sw_A:1; | |
102 Uint32 blit_fill; | |
103 Uint32 video_mem; | |
104 SDL_PixelFormat *vfmt; | |
105 } SDL_VideoInfo;</PRE | |
106 ></DIV | |
107 ><DIV | |
108 CLASS="REFSECT1" | |
109 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
110 NAME="AEN3396" |
0 | 111 ></A |
112 ><H2 | |
113 >Structure Data</H2 | |
114 ><DIV | |
115 CLASS="INFORMALTABLE" | |
116 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
117 NAME="AEN3398" |
0 | 118 ></A |
119 ><P | |
120 ></P | |
121 ><TABLE | |
122 BORDER="0" | |
123 CLASS="CALSTABLE" | |
124 ><TBODY | |
125 ><TR | |
126 ><TD | |
127 ALIGN="LEFT" | |
128 VALIGN="TOP" | |
129 ><TT | |
130 CLASS="STRUCTFIELD" | |
131 ><I | |
132 >hw_available</I | |
133 ></TT | |
134 ></TD | |
135 ><TD | |
136 ALIGN="LEFT" | |
137 VALIGN="TOP" | |
138 >Is it possible to create hardware surfaces?</TD | |
139 ></TR | |
140 ><TR | |
141 ><TD | |
142 ALIGN="LEFT" | |
143 VALIGN="TOP" | |
144 ><TT | |
145 CLASS="STRUCTFIELD" | |
146 ><I | |
147 >wm_available</I | |
148 ></TT | |
149 ></TD | |
150 ><TD | |
151 ALIGN="LEFT" | |
152 VALIGN="TOP" | |
153 >Is there a window manager available</TD | |
154 ></TR | |
155 ><TR | |
156 ><TD | |
157 ALIGN="LEFT" | |
158 VALIGN="TOP" | |
159 ><TT | |
160 CLASS="STRUCTFIELD" | |
161 ><I | |
162 >blit_hw</I | |
163 ></TT | |
164 ></TD | |
165 ><TD | |
166 ALIGN="LEFT" | |
167 VALIGN="TOP" | |
168 >Are hardware to hardware blits accelerated?</TD | |
169 ></TR | |
170 ><TR | |
171 ><TD | |
172 ALIGN="LEFT" | |
173 VALIGN="TOP" | |
174 ><TT | |
175 CLASS="STRUCTFIELD" | |
176 ><I | |
177 >blit_hw_CC</I | |
178 ></TT | |
179 ></TD | |
180 ><TD | |
181 ALIGN="LEFT" | |
182 VALIGN="TOP" | |
183 >Are hardware to hardware colorkey blits accelerated?</TD | |
184 ></TR | |
185 ><TR | |
186 ><TD | |
187 ALIGN="LEFT" | |
188 VALIGN="TOP" | |
189 ><TT | |
190 CLASS="STRUCTFIELD" | |
191 ><I | |
192 >blit_hw_A</I | |
193 ></TT | |
194 ></TD | |
195 ><TD | |
196 ALIGN="LEFT" | |
197 VALIGN="TOP" | |
198 >Are hardware to hardware alpha blits accelerated?</TD | |
199 ></TR | |
200 ><TR | |
201 ><TD | |
202 ALIGN="LEFT" | |
203 VALIGN="TOP" | |
204 ><TT | |
205 CLASS="STRUCTFIELD" | |
206 ><I | |
207 >blit_sw</I | |
208 ></TT | |
209 ></TD | |
210 ><TD | |
211 ALIGN="LEFT" | |
212 VALIGN="TOP" | |
213 >Are software to hardware blits accelerated?</TD | |
214 ></TR | |
215 ><TR | |
216 ><TD | |
217 ALIGN="LEFT" | |
218 VALIGN="TOP" | |
219 ><TT | |
220 CLASS="STRUCTFIELD" | |
221 ><I | |
222 >blit_sw_CC</I | |
223 ></TT | |
224 ></TD | |
225 ><TD | |
226 ALIGN="LEFT" | |
227 VALIGN="TOP" | |
228 >Are software to hardware colorkey blits accelerated?</TD | |
229 ></TR | |
230 ><TR | |
231 ><TD | |
232 ALIGN="LEFT" | |
233 VALIGN="TOP" | |
234 ><TT | |
235 CLASS="STRUCTFIELD" | |
236 ><I | |
237 >blit_sw_A</I | |
238 ></TT | |
239 ></TD | |
240 ><TD | |
241 ALIGN="LEFT" | |
242 VALIGN="TOP" | |
243 >Are software to hardware alpha blits accelerated?</TD | |
244 ></TR | |
245 ><TR | |
246 ><TD | |
247 ALIGN="LEFT" | |
248 VALIGN="TOP" | |
249 ><TT | |
250 CLASS="STRUCTFIELD" | |
251 ><I | |
252 >blit_fill</I | |
253 ></TT | |
254 ></TD | |
255 ><TD | |
256 ALIGN="LEFT" | |
257 VALIGN="TOP" | |
258 >Are color fills accelerated?</TD | |
259 ></TR | |
260 ><TR | |
261 ><TD | |
262 ALIGN="LEFT" | |
263 VALIGN="TOP" | |
264 ><TT | |
265 CLASS="STRUCTFIELD" | |
266 ><I | |
267 >video_mem</I | |
268 ></TT | |
269 ></TD | |
270 ><TD | |
271 ALIGN="LEFT" | |
272 VALIGN="TOP" | |
273 >Total amount of video memory in Kilobytes</TD | |
274 ></TR | |
275 ><TR | |
276 ><TD | |
277 ALIGN="LEFT" | |
278 VALIGN="TOP" | |
279 ><TT | |
280 CLASS="STRUCTFIELD" | |
281 ><I | |
282 >vfmt</I | |
283 ></TT | |
284 ></TD | |
285 ><TD | |
286 ALIGN="LEFT" | |
287 VALIGN="TOP" | |
288 ><A | |
289 HREF="sdlpixelformat.html" | |
290 >Pixel format</A | |
291 > of the video device</TD | |
292 ></TR | |
293 ></TBODY | |
294 ></TABLE | |
295 ><P | |
296 ></P | |
297 ></DIV | |
298 ></DIV | |
299 ><DIV | |
300 CLASS="REFSECT1" | |
301 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
302 NAME="AEN3446" |
0 | 303 ></A |
304 ><H2 | |
305 >Description</H2 | |
306 ><P | |
307 >This (read-only) structure is returned by <A | |
308 HREF="sdlgetvideoinfo.html" | |
309 ><TT | |
310 CLASS="FUNCTION" | |
311 >SDL_GetVideoInfo</TT | |
312 ></A | |
313 >. It contains information on either the 'best' available mode (if called before <A | |
314 HREF="sdlsetvideomode.html" | |
315 ><TT | |
316 CLASS="FUNCTION" | |
317 >SDL_SetVideoMode</TT | |
318 ></A | |
319 >) or the current video mode.</P | |
320 ></DIV | |
321 ><DIV | |
322 CLASS="REFSECT1" | |
323 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
324 NAME="AEN3453" |
0 | 325 ></A |
326 ><H2 | |
327 >See Also</H2 | |
328 ><P | |
329 ><A | |
330 HREF="sdlpixelformat.html" | |
331 ><SPAN | |
332 CLASS="STRUCTNAME" | |
333 >SDL_PixelFormat</SPAN | |
334 ></A | |
335 >, | |
336 <A | |
337 HREF="sdlgetvideoinfo.html" | |
338 ><TT | |
339 CLASS="FUNCTION" | |
340 >SDL_GetVideoInfo</TT | |
341 ></A | |
342 ></P | |
343 ></DIV | |
344 ><DIV | |
345 CLASS="NAVFOOTER" | |
346 ><HR | |
347 ALIGN="LEFT" | |
348 WIDTH="100%"><TABLE | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
349 SUMMARY="Footer navigation table" |
0 | 350 WIDTH="100%" |
351 BORDER="0" | |
352 CELLPADDING="0" | |
353 CELLSPACING="0" | |
354 ><TR | |
355 ><TD | |
356 WIDTH="33%" | |
357 ALIGN="left" | |
358 VALIGN="top" | |
359 ><A | |
360 HREF="sdlsurface.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
361 ACCESSKEY="P" |
0 | 362 >Prev</A |
363 ></TD | |
364 ><TD | |
365 WIDTH="34%" | |
366 ALIGN="center" | |
367 VALIGN="top" | |
368 ><A | |
369 HREF="index.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
370 ACCESSKEY="H" |
0 | 371 >Home</A |
372 ></TD | |
373 ><TD | |
374 WIDTH="33%" | |
375 ALIGN="right" | |
376 VALIGN="top" | |
377 ><A | |
378 HREF="sdloverlay.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
379 ACCESSKEY="N" |
0 | 380 >Next</A |
381 ></TD | |
382 ></TR | |
383 ><TR | |
384 ><TD | |
385 WIDTH="33%" | |
386 ALIGN="left" | |
387 VALIGN="top" | |
388 >SDL_Surface</TD | |
389 ><TD | |
390 WIDTH="34%" | |
391 ALIGN="center" | |
392 VALIGN="top" | |
393 ><A | |
394 HREF="video.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
395 ACCESSKEY="U" |
0 | 396 >Up</A |
397 ></TD | |
398 ><TD | |
399 WIDTH="33%" | |
400 ALIGN="right" | |
401 VALIGN="top" | |
402 >SDL_Overlay</TD | |
403 ></TR | |
404 ></TABLE | |
405 ></DIV | |
406 ></BODY | |
407 ></HTML | |
408 > |