0
|
1 <HTML
|
|
2 ><HEAD
|
|
3 ><TITLE
|
|
4 >General</TITLE
|
|
5 ><META
|
|
6 NAME="GENERATOR"
|
|
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.61
|
|
8 "><LINK
|
|
9 REL="HOME"
|
|
10 TITLE="SDL Library Documentation"
|
|
11 HREF="index.html"><LINK
|
|
12 REL="UP"
|
|
13 TITLE="SDL Reference"
|
|
14 HREF="reference.html"><LINK
|
|
15 REL="PREVIOUS"
|
|
16 TITLE="SDL Reference"
|
|
17 HREF="reference.html"><LINK
|
|
18 REL="NEXT"
|
|
19 TITLE="SDL_Init"
|
|
20 HREF="sdlinit.html"><META
|
|
21 NAME="KEYWORD"
|
|
22 CONTENT="general"><META
|
|
23 NAME="KEYWORD"
|
|
24 CONTENT="function"></HEAD
|
|
25 ><BODY
|
|
26 CLASS="CHAPTER"
|
|
27 BGCOLOR="#FFF8DC"
|
|
28 TEXT="#000000"
|
|
29 LINK="#0000ee"
|
|
30 VLINK="#551a8b"
|
|
31 ALINK="#ff0000"
|
|
32 ><DIV
|
|
33 CLASS="NAVHEADER"
|
|
34 ><TABLE
|
|
35 WIDTH="100%"
|
|
36 BORDER="0"
|
|
37 CELLPADDING="0"
|
|
38 CELLSPACING="0"
|
|
39 ><TR
|
|
40 ><TH
|
|
41 COLSPAN="3"
|
|
42 ALIGN="center"
|
|
43 >SDL Library Documentation</TH
|
|
44 ></TR
|
|
45 ><TR
|
|
46 ><TD
|
|
47 WIDTH="10%"
|
|
48 ALIGN="left"
|
|
49 VALIGN="bottom"
|
|
50 ><A
|
|
51 HREF="reference.html"
|
|
52 >Prev</A
|
|
53 ></TD
|
|
54 ><TD
|
|
55 WIDTH="80%"
|
|
56 ALIGN="center"
|
|
57 VALIGN="bottom"
|
|
58 ></TD
|
|
59 ><TD
|
|
60 WIDTH="10%"
|
|
61 ALIGN="right"
|
|
62 VALIGN="bottom"
|
|
63 ><A
|
|
64 HREF="sdlinit.html"
|
|
65 >Next</A
|
|
66 ></TD
|
|
67 ></TR
|
|
68 ></TABLE
|
|
69 ><HR
|
|
70 ALIGN="LEFT"
|
|
71 WIDTH="100%"></DIV
|
|
72 ><DIV
|
|
73 CLASS="CHAPTER"
|
|
74 ><H1
|
|
75 ><A
|
|
76 NAME="GENERAL"
|
|
77 >Chapter 5. General</A
|
|
78 ></H1
|
|
79 ><DIV
|
|
80 CLASS="TOC"
|
|
81 ><DL
|
|
82 ><DT
|
|
83 ><B
|
|
84 >Table of Contents</B
|
|
85 ></DT
|
|
86 ><DT
|
|
87 ><A
|
|
88 HREF="sdlinit.html"
|
|
89 >SDL_Init</A
|
|
90 > — Initializes SDL</DT
|
|
91 ><DT
|
|
92 ><A
|
|
93 HREF="sdlinitsubsystem.html"
|
|
94 >SDL_InitSubSystem</A
|
|
95 > — Initialize subsystems</DT
|
|
96 ><DT
|
|
97 ><A
|
|
98 HREF="sdlquitsubsystem.html"
|
|
99 >SDL_QuitSubSystem</A
|
|
100 > — Shut down a subsystem</DT
|
|
101 ><DT
|
|
102 ><A
|
|
103 HREF="sdlquit.html"
|
|
104 >SDL_Quit</A
|
|
105 > — Shut down SDL</DT
|
|
106 ><DT
|
|
107 ><A
|
|
108 HREF="sdlwasinit.html"
|
|
109 >SDL_WasInit</A
|
|
110 > — Check which subsystems are initialized</DT
|
|
111 ></DL
|
|
112 ></DIV
|
|
113 ><P
|
|
114 >Before SDL can be used in a program it must be initialized with <A
|
|
115 HREF="sdlinit.html"
|
|
116 ><TT
|
|
117 CLASS="FUNCTION"
|
|
118 >SDL_Init</TT
|
|
119 ></A
|
|
120 >. <TT
|
|
121 CLASS="FUNCTION"
|
|
122 >SDL_Init</TT
|
|
123 > initializes all the subsystems that the user requests (video, audio, joystick, timers and/or cdrom). Once SDL is initialized with <TT
|
|
124 CLASS="FUNCTION"
|
|
125 >SDL_Init</TT
|
|
126 > subsystems can be shut down and initialized as needed using <A
|
|
127 HREF="sdlinitsubsystem.html"
|
|
128 ><TT
|
|
129 CLASS="FUNCTION"
|
|
130 >SDL_InitSubSystem</TT
|
|
131 ></A
|
|
132 > and <A
|
|
133 HREF="sdlquitsubsystem.html"
|
|
134 ><TT
|
|
135 CLASS="FUNCTION"
|
|
136 >SDL_QuitSubSystem</TT
|
|
137 ></A
|
|
138 >.</P
|
|
139 ><P
|
|
140 >SDL must also be shut down before the program exits to make sure it cleans up correctly. Calling <A
|
|
141 HREF="sdlquit.html"
|
|
142 ><TT
|
|
143 CLASS="FUNCTION"
|
|
144 >SDL_Quit</TT
|
|
145 ></A
|
|
146 > shuts down all subsystems and frees any resources allocated to SDL.</P
|
|
147 ></DIV
|
|
148 ><DIV
|
|
149 CLASS="NAVFOOTER"
|
|
150 ><HR
|
|
151 ALIGN="LEFT"
|
|
152 WIDTH="100%"><TABLE
|
|
153 WIDTH="100%"
|
|
154 BORDER="0"
|
|
155 CELLPADDING="0"
|
|
156 CELLSPACING="0"
|
|
157 ><TR
|
|
158 ><TD
|
|
159 WIDTH="33%"
|
|
160 ALIGN="left"
|
|
161 VALIGN="top"
|
|
162 ><A
|
|
163 HREF="reference.html"
|
|
164 >Prev</A
|
|
165 ></TD
|
|
166 ><TD
|
|
167 WIDTH="34%"
|
|
168 ALIGN="center"
|
|
169 VALIGN="top"
|
|
170 ><A
|
|
171 HREF="index.html"
|
|
172 >Home</A
|
|
173 ></TD
|
|
174 ><TD
|
|
175 WIDTH="33%"
|
|
176 ALIGN="right"
|
|
177 VALIGN="top"
|
|
178 ><A
|
|
179 HREF="sdlinit.html"
|
|
180 >Next</A
|
|
181 ></TD
|
|
182 ></TR
|
|
183 ><TR
|
|
184 ><TD
|
|
185 WIDTH="33%"
|
|
186 ALIGN="left"
|
|
187 VALIGN="top"
|
|
188 >SDL Reference</TD
|
|
189 ><TD
|
|
190 WIDTH="34%"
|
|
191 ALIGN="center"
|
|
192 VALIGN="top"
|
|
193 ><A
|
|
194 HREF="reference.html"
|
|
195 >Up</A
|
|
196 ></TD
|
|
197 ><TD
|
|
198 WIDTH="33%"
|
|
199 ALIGN="right"
|
|
200 VALIGN="top"
|
|
201 >SDL_Init</TD
|
|
202 ></TR
|
|
203 ></TABLE
|
|
204 ></DIV
|
|
205 ></BODY
|
|
206 ></HTML
|
|
207 > |