7 CONTENT=
"Modular DocBook HTML Stylesheet Version 1.76b+
10 TITLE=
"SDL Library Documentation"
11 HREF=
"index.html"><LINK
14 HREF=
"general.html"><LINK
17 HREF=
"sdlquit.html"><LINK
20 HREF=
"sdlgeterror.html"></HEAD
31 SUMMARY=
"Header navigation table"
40 >SDL Library Documentation
</TH
62 HREF=
"sdlgeterror.html"
83 >SDL_WasInit
--
Check which subsystems are initialized
</DIV
85 CLASS=
"REFSYNOPSISDIV"
99 CLASS=
"FUNCSYNOPSISINFO"
100 >#include
"SDL.h"</PRE
109 >(Uint32 flags);
</CODE
126 > allows you to see which SDL subsytems have been
<A
134 > is a bitwise OR'd combination of the subsystems you wish to check (see
<A
140 > for a list of subsystem flags).
</P
153 > returns a bitwised OR'd combination of the initialized subsystems.
</P
163 CLASS=
"PROGRAMLISTING"
164 > /* Here are several ways you can use SDL_WasInit() */
166 /* Get init data on all the subsystems */
167 Uint32 subsystem_init;
169 subsystem_init=SDL_WasInit(SDL_INIT_EVERYTHING);
171 if(subsystem_init
&SDL_INIT_VIDEO)
172 printf(
"Video is initialized.\n");
174 printf(
"Video is not initialized.\n");
178 /* Just check for one specfic subsystem */
180 if(SDL_WasInit(SDL_INIT_VIDEO)!=
0)
181 printf(
"Video is initialized.\n");
183 printf(
"Video is not initialized.\n");
188 /* Check for two subsystems */
190 Uint32 subsystem_mask=SDL_INIT_VIDEO|SDL_INIT_AUDIO;
192 if(SDL_WasInit(subsystem_mask)==subsystem_mask)
193 printf(
"Video and Audio initialized.\n");
195 printf(
"Video and Audio not initialized.\n");
</PRE
213 HREF=
"sdlinitsubsystem.html"
225 SUMMARY=
"Footer navigation table"
254 HREF=
"sdlgeterror.html"