comparison src/SDL.c @ 3243:5db962a9a991

CD-ROM support is so passé :)
author Sam Lantinga <slouken@libsdl.org>
date Sat, 05 Sep 2009 09:11:03 +0000
parents 972a69e47cd9
children a67a961e2171
comparison
equal deleted inserted replaced
3242:af4a5af3cd2b 3243:5db962a9a991
39 extern void SDL_JoystickQuit(void); 39 extern void SDL_JoystickQuit(void);
40 #endif 40 #endif
41 #if !SDL_HAPTIC_DISABLED 41 #if !SDL_HAPTIC_DISABLED
42 extern int SDL_HapticInit(void); 42 extern int SDL_HapticInit(void);
43 extern int SDL_HapticQuit(void); 43 extern int SDL_HapticQuit(void);
44 #endif
45 #if !SDL_CDROM_DISABLED
46 extern int SDL_CDROMInit(void);
47 extern void SDL_CDROMQuit(void);
48 #endif 44 #endif
49 #if !SDL_TIMERS_DISABLED 45 #if !SDL_TIMERS_DISABLED
50 extern void SDL_StartTicks(void); 46 extern void SDL_StartTicks(void);
51 extern int SDL_TimerInit(void); 47 extern int SDL_TimerInit(void);
52 extern void SDL_TimerQuit(void); 48 extern void SDL_TimerQuit(void);
143 if (flags & SDL_INIT_HAPTIC) { 139 if (flags & SDL_INIT_HAPTIC) {
144 SDL_SetError("SDL not built with haptic (force feedback) support"); 140 SDL_SetError("SDL not built with haptic (force feedback) support");
145 return (-1); 141 return (-1);
146 } 142 }
147 #endif 143 #endif
148
149
150 #if !SDL_CDROM_DISABLED
151 /* Initialize the CD-ROM subsystem */
152 if ((flags & SDL_INIT_CDROM) && !(SDL_initialized & SDL_INIT_CDROM)) {
153 if (SDL_CDROMInit() < 0) {
154 return (-1);
155 }
156 SDL_initialized |= SDL_INIT_CDROM;
157 }
158 #else
159 if (flags & SDL_INIT_CDROM) {
160 SDL_SetError("SDL not built with cdrom support");
161 return (-1);
162 }
163 #endif
164 return (0); 144 return (0);
165 } 145 }
166 146
167 int 147 int
168 SDL_Init(Uint32 flags) 148 SDL_Init(Uint32 flags)
196 176
197 void 177 void
198 SDL_QuitSubSystem(Uint32 flags) 178 SDL_QuitSubSystem(Uint32 flags)
199 { 179 {
200 /* Shut down requested initialized subsystems */ 180 /* Shut down requested initialized subsystems */
201 #if !SDL_CDROM_DISABLED
202 if ((flags & SDL_initialized & SDL_INIT_CDROM)) {
203 SDL_CDROMQuit();
204 SDL_initialized &= ~SDL_INIT_CDROM;
205 }
206 #endif
207 #if !SDL_JOYSTICK_DISABLED 181 #if !SDL_JOYSTICK_DISABLED
208 if ((flags & SDL_initialized & SDL_INIT_JOYSTICK)) { 182 if ((flags & SDL_initialized & SDL_INIT_JOYSTICK)) {
209 SDL_JoystickQuit(); 183 SDL_JoystickQuit();
210 SDL_initialized &= ~SDL_INIT_JOYSTICK; 184 SDL_initialized &= ~SDL_INIT_JOYSTICK;
211 } 185 }