src/video/SDL_video.c
changeset 7360 b86947ea2749
parent 7269 f7a0cc4bf74d
child 7390 e4b98404baa4
equal deleted inserted replaced
7359:96ac247b672e 7360:b86947ea2749
   420 #if !SDL_TIMERS_DISABLED
   420 #if !SDL_TIMERS_DISABLED
   421     SDL_InitTicks();
   421     SDL_InitTicks();
   422 #endif
   422 #endif
   423 
   423 
   424     /* Start the event loop */
   424     /* Start the event loop */
   425     if (SDL_StartEventLoop() < 0 ||
   425     if (SDL_InitSubSystem(SDL_INIT_EVENTS) < 0 ||
   426         SDL_KeyboardInit() < 0 ||
   426         SDL_KeyboardInit() < 0 ||
   427         SDL_MouseInit() < 0 ||
   427         SDL_MouseInit() < 0 ||
   428         SDL_TouchInit() < 0 ||
   428         SDL_TouchInit() < 0) {
   429         SDL_QuitInit() < 0) {
       
   430         return -1;
   429         return -1;
   431     }
   430     }
   432 
   431 
   433     /* Select the proper video driver */
   432     /* Select the proper video driver */
   434     index = 0;
   433     index = 0;
  2231     if (!_this) {
  2230     if (!_this) {
  2232         return;
  2231         return;
  2233     }
  2232     }
  2234 
  2233 
  2235     /* Halt event processing before doing anything else */
  2234     /* Halt event processing before doing anything else */
  2236     SDL_QuitQuit();
  2235     SDL_TouchQuit();
  2237     SDL_MouseQuit();
  2236     SDL_MouseQuit();
  2238     SDL_KeyboardQuit();
  2237     SDL_KeyboardQuit();
  2239     SDL_StopEventLoop();
  2238     SDL_QuitSubSystem(SDL_INIT_EVENTS);
  2240 
  2239 
  2241     SDL_EnableScreenSaver();
  2240     SDL_EnableScreenSaver();
  2242 
  2241 
  2243     /* Clean up the system video */
  2242     /* Clean up the system video */
  2244     while (_this->windows) {
  2243     while (_this->windows) {