src/SDL.c
branchgsoc2008_nds
changeset 2678 3895761db26a
parent 2674 f1d07ba2e275
equal deleted inserted replaced
2677:6386764eb222 2678:3895761db26a
    35 
    35 
    36 /* Initialization/Cleanup routines */
    36 /* Initialization/Cleanup routines */
    37 #if !SDL_JOYSTICK_DISABLED
    37 #if !SDL_JOYSTICK_DISABLED
    38 extern int SDL_JoystickInit(void);
    38 extern int SDL_JoystickInit(void);
    39 extern void SDL_JoystickQuit(void);
    39 extern void SDL_JoystickQuit(void);
    40 #endif
       
    41 #if !SDL_TOUCHSCREEN_DISABLED
       
    42 extern int SDL_TouchscreenInit(void);
       
    43 extern void SDL_TouchscreenQuit(void);
       
    44 #endif
    40 #endif
    45 #if !SDL_CDROM_DISABLED
    41 #if !SDL_CDROM_DISABLED
    46 extern int SDL_CDROMInit(void);
    42 extern int SDL_CDROMInit(void);
    47 extern void SDL_CDROMQuit(void);
    43 extern void SDL_CDROMQuit(void);
    48 #endif
    44 #endif
   125         SDL_SetError("SDL not built with joystick support");
   121         SDL_SetError("SDL not built with joystick support");
   126         return (-1);
   122         return (-1);
   127     }
   123     }
   128 #endif
   124 #endif
   129 
   125 
   130 #if !SDL_TOUCHSCREEN_DISABLED
       
   131     /* Initialize the touchscreen subsystem */
       
   132     if ((flags & SDL_INIT_TOUCHSCREEN) && !(SDL_initialized & SDL_INIT_TOUCHSCREEN)) {
       
   133         if (SDL_TouchscreenInit() < 0) {
       
   134             return (-1);
       
   135         }
       
   136         SDL_initialized |= SDL_INIT_TOUCHSCREEN;
       
   137     }
       
   138 #else
       
   139     if (flags & SDL_INIT_TOUCHSCREEN) {
       
   140         SDL_SetError("SDL not built with touchscreen support");
       
   141         return (-1);
       
   142     }
       
   143 #endif
       
   144 
       
   145 #if !SDL_CDROM_DISABLED
   126 #if !SDL_CDROM_DISABLED
   146     /* Initialize the CD-ROM subsystem */
   127     /* Initialize the CD-ROM subsystem */
   147     if ((flags & SDL_INIT_CDROM) && !(SDL_initialized & SDL_INIT_CDROM)) {
   128     if ((flags & SDL_INIT_CDROM) && !(SDL_initialized & SDL_INIT_CDROM)) {
   148         if (SDL_CDROMInit() < 0) {
   129         if (SDL_CDROMInit() < 0) {
   149             return (-1);
   130             return (-1);
   195 #endif
   176 #endif
   196 #if !SDL_JOYSTICK_DISABLED
   177 #if !SDL_JOYSTICK_DISABLED
   197     if ((flags & SDL_initialized & SDL_INIT_JOYSTICK)) {
   178     if ((flags & SDL_initialized & SDL_INIT_JOYSTICK)) {
   198         SDL_JoystickQuit();
   179         SDL_JoystickQuit();
   199         SDL_initialized &= ~SDL_INIT_JOYSTICK;
   180         SDL_initialized &= ~SDL_INIT_JOYSTICK;
   200     }
       
   201 #endif
       
   202 #if !SDL_TOUCHSCREEN_DISABLED
       
   203     if ((flags & SDL_initialized & SDL_INIT_TOUCHSCREEN)) {
       
   204         SDL_TouchscreenQuit();
       
   205         SDL_initialized &= ~SDL_INIT_TOUCHSCREEN;
       
   206     }
   181     }
   207 #endif
   182 #endif
   208 #if !SDL_TIMERS_DISABLED
   183 #if !SDL_TIMERS_DISABLED
   209     if ((flags & SDL_initialized & SDL_INIT_TIMER)) {
   184     if ((flags & SDL_initialized & SDL_INIT_TIMER)) {
   210         SDL_TimerQuit();
   185         SDL_TimerQuit();