Mercurial > sdl-ios-xcode
comparison docs/html/guidebasicsinit.html @ 55:55f1f1b3e27d
Added new docs for SDL 1.2.1
author | Sam Lantinga <slouken@lokigames.com> |
---|---|
date | Sun, 10 Jun 2001 19:31:57 +0000 |
parents | 74212992fb08 |
children | e5bc29de3f0a |
comparison
equal
deleted
inserted
replaced
54:028447a8a758 | 55:55f1f1b3e27d |
---|---|
2 ><HEAD | 2 ><HEAD |
3 ><TITLE | 3 ><TITLE |
4 >Initializing SDL</TITLE | 4 >Initializing SDL</TITLE |
5 ><META | 5 ><META |
6 NAME="GENERATOR" | 6 NAME="GENERATOR" |
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.61 | 7 CONTENT="Modular DocBook HTML Stylesheet Version 1.64 |
8 "><LINK | 8 "><LINK |
9 REL="HOME" | 9 REL="HOME" |
10 TITLE="SDL Library Documentation" | 10 TITLE="SDL Library Documentation" |
11 HREF="index.html"><LINK | 11 HREF="index.html"><LINK |
12 REL="UP" | 12 REL="UP" |
131 >SDL_Init</TT | 131 >SDL_Init</TT |
132 >, for instance, returns -1 if it could not initialize a subsystem. SDL provides a useful facility that allows you to determine exactly what the problem was, every time an error occurs within SDL an error message is stored which can be retrieved using <TT | 132 >, for instance, returns -1 if it could not initialize a subsystem. SDL provides a useful facility that allows you to determine exactly what the problem was, every time an error occurs within SDL an error message is stored which can be retrieved using <TT |
133 CLASS="FUNCTION" | 133 CLASS="FUNCTION" |
134 >SDL_GetError</TT | 134 >SDL_GetError</TT |
135 >. Use this often, you can never know too much about an error.</P | 135 >. Use this often, you can never know too much about an error.</P |
136 ><P | 136 ><DIV |
137 CLASS="EXAMPLE" | |
138 ><A | |
139 NAME="AEN60" | |
140 ></A | |
141 ><P | |
142 ><B | |
143 >Example 1-1. Initializing SDL</B | |
144 ></P | |
137 ><PRE | 145 ><PRE |
138 CLASS="PROGRAMLISTING" | 146 CLASS="PROGRAMLISTING" |
139 >#include "SDL.h" /* All SDL App's need this */ | 147 >#include "SDL.h" /* All SDL App's need this */ |
140 #include <stdio.h> | 148 #include <stdio.h> |
141 | 149 |
158 | 166 |
159 printf("Quiting....\n"); | 167 printf("Quiting....\n"); |
160 | 168 |
161 exit(0); | 169 exit(0); |
162 } </PRE | 170 } </PRE |
163 ></P | 171 ></DIV |
164 ></DIV | 172 ></DIV |
165 ><DIV | 173 ><DIV |
166 CLASS="NAVFOOTER" | 174 CLASS="NAVFOOTER" |
167 ><HR | 175 ><HR |
168 ALIGN="LEFT" | 176 ALIGN="LEFT" |