Mercurial > sdl-ios-xcode
annotate docs/html/sdlupdaterect.html @ 1614:6162b8d921ce
Date: Wed, 29 Mar 2006 17:26:55 +0200 CEST
From: "Fran���is Revol"
Subject: [SDL] BeOS port fix: PrintScreen key crashing
It seems the latest SDL crashes when someone hits the PrtScrn key in
ZETA (BeOS R6), somewhere it gets a negative value as key code (or a
big unsigned maybe ?), and uses it as an index in the keysym table...
I'll investigate the cause for the negative value, but it's always
better to check for bounds correctly when indexing a table. The
attached diff fixes it.
Fran���is Revol
--
Software Architect
yellowTAB GmbH
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 31 Mar 2006 06:16:20 +0000 |
parents | 355632dca928 |
children |
rev | line source |
---|---|
0 | 1 <HTML |
2 ><HEAD | |
3 ><TITLE | |
4 >SDL_UpdateRect</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_SetVideoMode" | |
17 HREF="sdlsetvideomode.html"><LINK | |
18 REL="NEXT" | |
19 TITLE="SDL_UpdateRects" | |
20 HREF="sdlupdaterects.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="sdlsetvideomode.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="sdlupdaterects.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="SDLUPDATERECT" | |
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_UpdateRect</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="AEN1355" |
0 | 80 ></A |
81 ><H2 | |
82 >Name</H2 | |
83 >SDL_UpdateRect -- Makes sure the given area is updated on the given screen.</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="AEN1358" |
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="AEN1359" |
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 >void <B | |
106 CLASS="FSFUNC" | |
107 >SDL_UpdateRect</B | |
108 ></CODE | |
109 >(SDL_Surface *screen, Sint32 x, Sint32 y, Sint32 w, Sint32 h);</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="AEN1365" |
0 | 119 ></A |
120 ><H2 | |
121 >Description</H2 | |
122 ><P | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
123 >Makes sure the given area is updated on the given screen. The rectangle must |
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
124 be confined within the screen boundaries (no clipping is done).</P |
0 | 125 ><P |
126 >If '<TT | |
127 CLASS="PARAMETER" | |
128 ><I | |
129 >x</I | |
130 ></TT | |
131 >', '<TT | |
132 CLASS="PARAMETER" | |
133 ><I | |
134 >y</I | |
135 ></TT | |
136 >', '<TT | |
137 CLASS="PARAMETER" | |
138 ><I | |
139 >w</I | |
140 ></TT | |
141 >' | |
142 and '<TT | |
143 CLASS="PARAMETER" | |
144 ><I | |
145 >h</I | |
146 ></TT | |
147 >' are all 0, | |
148 <TT | |
149 CLASS="FUNCTION" | |
150 >SDL_UpdateRect</TT | |
151 > will update the | |
152 entire screen.</P | |
153 ><P | |
154 >This function should not be called while '<TT | |
155 CLASS="PARAMETER" | |
156 ><I | |
157 >screen</I | |
158 ></TT | |
159 >' is | |
160 <A | |
161 HREF="sdllocksurface.html" | |
162 >locked</A | |
163 >.</P | |
164 ></DIV | |
165 ><DIV | |
166 CLASS="REFSECT1" | |
167 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
168 NAME="AEN1377" |
0 | 169 ></A |
170 ><H2 | |
171 >See Also</H2 | |
172 ><P | |
173 ><A | |
174 HREF="sdlupdaterects.html" | |
175 ><TT | |
176 CLASS="FUNCTION" | |
177 >SDL_UpdateRects</TT | |
178 ></A | |
179 >, | |
180 <A | |
181 HREF="sdlrect.html" | |
182 ><SPAN | |
183 CLASS="STRUCTNAME" | |
184 >SDL_Rect</SPAN | |
185 ></A | |
186 >, | |
187 <A | |
188 HREF="sdlsurface.html" | |
189 ><SPAN | |
190 CLASS="STRUCTNAME" | |
191 >SDL_Surface</SPAN | |
192 ></A | |
193 >, | |
194 <A | |
195 HREF="sdllocksurface.html" | |
196 ><TT | |
197 CLASS="FUNCTION" | |
198 >SDL_LockSurface</TT | |
199 ></A | |
200 ></P | |
201 ></DIV | |
202 ><DIV | |
203 CLASS="NAVFOOTER" | |
204 ><HR | |
205 ALIGN="LEFT" | |
206 WIDTH="100%"><TABLE | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
207 SUMMARY="Footer navigation table" |
0 | 208 WIDTH="100%" |
209 BORDER="0" | |
210 CELLPADDING="0" | |
211 CELLSPACING="0" | |
212 ><TR | |
213 ><TD | |
214 WIDTH="33%" | |
215 ALIGN="left" | |
216 VALIGN="top" | |
217 ><A | |
218 HREF="sdlsetvideomode.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
219 ACCESSKEY="P" |
0 | 220 >Prev</A |
221 ></TD | |
222 ><TD | |
223 WIDTH="34%" | |
224 ALIGN="center" | |
225 VALIGN="top" | |
226 ><A | |
227 HREF="index.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
228 ACCESSKEY="H" |
0 | 229 >Home</A |
230 ></TD | |
231 ><TD | |
232 WIDTH="33%" | |
233 ALIGN="right" | |
234 VALIGN="top" | |
235 ><A | |
236 HREF="sdlupdaterects.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
237 ACCESSKEY="N" |
0 | 238 >Next</A |
239 ></TD | |
240 ></TR | |
241 ><TR | |
242 ><TD | |
243 WIDTH="33%" | |
244 ALIGN="left" | |
245 VALIGN="top" | |
246 >SDL_SetVideoMode</TD | |
247 ><TD | |
248 WIDTH="34%" | |
249 ALIGN="center" | |
250 VALIGN="top" | |
251 ><A | |
252 HREF="video.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
253 ACCESSKEY="U" |
0 | 254 >Up</A |
255 ></TD | |
256 ><TD | |
257 WIDTH="33%" | |
258 ALIGN="right" | |
259 VALIGN="top" | |
260 >SDL_UpdateRects</TD | |
261 ></TR | |
262 ></TABLE | |
263 ></DIV | |
264 ></BODY | |
265 ></HTML | |
266 > |