1 .TH "SDL_WasInit" "3" "Tue 11 Sep 2001, 23:00" "SDL" "SDL API Reference"
3 SDL_WasInit\- Check which subsystems are initialized
8 \fBUint32 \fBSDL_WasInit\fP\fR(\fBUint32 flags\fR);
11 \fBSDL_WasInit\fP allows you to see which SDL subsytems have been \fIinitialized\fR\&. \fBflags\fR is a bitwise OR\&'d combination of the subsystems you wish to check (see \fI\fBSDL_Init\fP\fR for a list of subsystem flags)\&.
14 \fBSDL_WasInit\fP returns a bitwised OR\&'d combination of the initialized subsystems\&.
19 /* Here are several ways you can use SDL_WasInit() */
21 /* Get init data on all the subsystems */
22 Uint32 subsystem_init;
24 subsystem_init=SDL_WasInit(SDL_INIT_EVERYTHING);
26 if(subsystem_init&SDL_INIT_VIDEO)
27 printf("Video is initialized\&.
30 printf("Video is not initialized\&.
35 /* Just check for one specfic subsystem */
37 if(SDL_WasInit(SDL_INIT_VIDEO)!=0)
38 printf("Video is initialized\&.
41 printf("Video is not initialized\&.
47 /* Check for two subsystems */
49 Uint32 subsystem_mask=SDL_INIT_VIDEO|SDL_INIT_AUDIO;
51 if(SDL_WasInit(subsystem_mask)==subsystem_mask)
52 printf("Video and Audio initialized\&.
55 printf("Video and Audio not initialized\&.
62 \fI\fBSDL_Init\fP\fR, \fI\fBSDL_Subsystem\fP\fR
63 ...\" created by instant / docbook-to-man, Tue 11 Sep 2001, 23:00