Mercurial > sdl-ios-xcode
annotate docs/html/sdlwasinit.html @ 77:1e7e61b9b0f9
Don't crash if freeing a cursor after quit...
author | Sam Lantinga <slouken@lokigames.com> |
---|---|
date | Tue, 19 Jun 2001 21:07:12 +0000 |
parents | 55f1f1b3e27d |
children | e5bc29de3f0a |
rev | line source |
---|---|
0 | 1 <HTML |
2 ><HEAD | |
3 ><TITLE | |
4 >SDL_WasInit</TITLE | |
5 ><META | |
6 NAME="GENERATOR" | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.64 |
0 | 8 "><LINK |
9 REL="HOME" | |
10 TITLE="SDL Library Documentation" | |
11 HREF="index.html"><LINK | |
12 REL="UP" | |
13 TITLE="General" | |
14 HREF="general.html"><LINK | |
15 REL="PREVIOUS" | |
16 TITLE="SDL_Quit" | |
17 HREF="sdlquit.html"><LINK | |
18 REL="NEXT" | |
19 TITLE="Video" | |
20 HREF="video.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 | |
31 WIDTH="100%" | |
32 BORDER="0" | |
33 CELLPADDING="0" | |
34 CELLSPACING="0" | |
35 ><TR | |
36 ><TH | |
37 COLSPAN="3" | |
38 ALIGN="center" | |
39 >SDL Library Documentation</TH | |
40 ></TR | |
41 ><TR | |
42 ><TD | |
43 WIDTH="10%" | |
44 ALIGN="left" | |
45 VALIGN="bottom" | |
46 ><A | |
47 HREF="sdlquit.html" | |
48 >Prev</A | |
49 ></TD | |
50 ><TD | |
51 WIDTH="80%" | |
52 ALIGN="center" | |
53 VALIGN="bottom" | |
54 ></TD | |
55 ><TD | |
56 WIDTH="10%" | |
57 ALIGN="right" | |
58 VALIGN="bottom" | |
59 ><A | |
60 HREF="video.html" | |
61 >Next</A | |
62 ></TD | |
63 ></TR | |
64 ></TABLE | |
65 ><HR | |
66 ALIGN="LEFT" | |
67 WIDTH="100%"></DIV | |
68 ><H1 | |
69 ><A | |
70 NAME="SDLWASINIT" | |
71 >SDL_WasInit</A | |
72 ></H1 | |
73 ><DIV | |
74 CLASS="REFNAMEDIV" | |
75 ><A | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
76 NAME="AEN617" |
0 | 77 ></A |
78 ><H2 | |
79 >Name</H2 | |
80 >SDL_WasInit -- Check which subsystems are initialized</DIV | |
81 ><DIV | |
82 CLASS="REFSYNOPSISDIV" | |
83 ><A | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
84 NAME="AEN620" |
0 | 85 ></A |
86 ><H2 | |
87 >Synopsis</H2 | |
88 ><DIV | |
89 CLASS="FUNCSYNOPSIS" | |
90 ><A | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
91 NAME="AEN621" |
0 | 92 ></A |
93 ><P | |
94 ></P | |
95 ><PRE | |
96 CLASS="FUNCSYNOPSISINFO" | |
97 >#include "SDL.h"</PRE | |
98 ><P | |
99 ><CODE | |
100 ><CODE | |
101 CLASS="FUNCDEF" | |
102 >Uint32 <B | |
103 CLASS="FSFUNC" | |
104 >SDL_WasInit</B | |
105 ></CODE | |
106 >(Uint32 flags);</CODE | |
107 ></P | |
108 ><P | |
109 ></P | |
110 ></DIV | |
111 ></DIV | |
112 ><DIV | |
113 CLASS="REFSECT1" | |
114 ><A | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
115 NAME="AEN627" |
0 | 116 ></A |
117 ><H2 | |
118 >Description</H2 | |
119 ><P | |
120 ><TT | |
121 CLASS="FUNCTION" | |
122 >SDL_WasInit</TT | |
123 > allows you to see which SDL subsytems have been <A | |
124 HREF="sdlinit.html" | |
125 >initialized</A | |
126 >. <TT | |
127 CLASS="PARAMETER" | |
128 ><I | |
129 >flags</I | |
130 ></TT | |
131 > is a bitwise OR'd combination of the subsystems you wish to check (see <A | |
132 HREF="sdlinit.html" | |
133 ><TT | |
134 CLASS="FUNCTION" | |
135 >SDL_Init</TT | |
136 ></A | |
137 > for a list of subsystem flags).</P | |
138 ></DIV | |
139 ><DIV | |
140 CLASS="REFSECT1" | |
141 ><A | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
142 NAME="AEN635" |
0 | 143 ></A |
144 ><H2 | |
145 >Return Value</H2 | |
146 ><P | |
147 ><TT | |
148 CLASS="FUNCTION" | |
149 >SDL_WasInit</TT | |
150 > returns a bitwised OR'd combination of the initialized subsystems.</P | |
151 ></DIV | |
152 ><DIV | |
153 CLASS="REFSECT1" | |
154 ><A | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
155 NAME="AEN639" |
0 | 156 ></A |
157 ><H2 | |
158 >Examples</H2 | |
159 ><PRE | |
160 CLASS="PROGRAMLISTING" | |
161 > /* Here are several ways you can use SDL_WasInit() */ | |
162 | |
163 /* Get init data on all the subsystems */ | |
164 Uint32 subsystem_init; | |
165 | |
166 subsystem_init=SDL_WasInit(SDL_INIT_EVERYTHING); | |
167 | |
168 if(subsystem_init&SDL_INIT_VIDEO) | |
169 printf("Video is initialized.\n"); | |
170 else | |
171 printf("Video is not initialized.\n"); | |
172 | |
173 | |
174 | |
175 /* Just check for one specfic subsystem */ | |
176 | |
177 if(SDL_WasInit(SDL_INIT_VIDEO)!=0) | |
178 printf("Video is initialized.\n"); | |
179 else | |
180 printf("Video is not initialized.\n"); | |
181 | |
182 | |
183 | |
184 | |
185 /* Check for two subsystems */ | |
186 | |
187 Uint32 subsystem_mask=SDL_INIT_VIDEO|SDL_INIT_AUDIO; | |
188 | |
189 if(SDL_WasInit(subsystem_mask)==subsystem_mask) | |
190 printf("Video and Audio initialized.\n"); | |
191 else | |
192 printf("Video and Audio not initialized.\n"); </PRE | |
193 ></DIV | |
194 ><DIV | |
195 CLASS="REFSECT1" | |
196 ><A | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
197 NAME="AEN642" |
0 | 198 ></A |
199 ><H2 | |
200 >See Also</H2 | |
201 ><P | |
202 ><A | |
203 HREF="sdlinit.html" | |
204 ><TT | |
205 CLASS="FUNCTION" | |
206 >SDL_Init</TT | |
207 ></A | |
208 >, | |
209 <A | |
210 HREF="sdlinitsubsystem.html" | |
211 ><TT | |
212 CLASS="FUNCTION" | |
213 >SDL_Subsystem</TT | |
214 ></A | |
215 ></P | |
216 ></DIV | |
217 ><DIV | |
218 CLASS="NAVFOOTER" | |
219 ><HR | |
220 ALIGN="LEFT" | |
221 WIDTH="100%"><TABLE | |
222 WIDTH="100%" | |
223 BORDER="0" | |
224 CELLPADDING="0" | |
225 CELLSPACING="0" | |
226 ><TR | |
227 ><TD | |
228 WIDTH="33%" | |
229 ALIGN="left" | |
230 VALIGN="top" | |
231 ><A | |
232 HREF="sdlquit.html" | |
233 >Prev</A | |
234 ></TD | |
235 ><TD | |
236 WIDTH="34%" | |
237 ALIGN="center" | |
238 VALIGN="top" | |
239 ><A | |
240 HREF="index.html" | |
241 >Home</A | |
242 ></TD | |
243 ><TD | |
244 WIDTH="33%" | |
245 ALIGN="right" | |
246 VALIGN="top" | |
247 ><A | |
248 HREF="video.html" | |
249 >Next</A | |
250 ></TD | |
251 ></TR | |
252 ><TR | |
253 ><TD | |
254 WIDTH="33%" | |
255 ALIGN="left" | |
256 VALIGN="top" | |
257 >SDL_Quit</TD | |
258 ><TD | |
259 WIDTH="34%" | |
260 ALIGN="center" | |
261 VALIGN="top" | |
262 ><A | |
263 HREF="general.html" | |
264 >Up</A | |
265 ></TD | |
266 ><TD | |
267 WIDTH="33%" | |
268 ALIGN="right" | |
269 VALIGN="top" | |
270 >Video</TD | |
271 ></TR | |
272 ></TABLE | |
273 ></DIV | |
274 ></BODY | |
275 ></HTML | |
276 > |