src/timer/windows/SDL_systimer.c
changeset 7652 cf8970659129
parent 7650 cd3465de2f42
child 8093 b43765095a6f
child 8535 e8ee0708ef5c
equal deleted inserted replaced
7651:e36a26e969c7 7652:cf8970659129
   106 }
   106 }
   107 
   107 
   108 Uint32
   108 Uint32
   109 SDL_GetTicks(void)
   109 SDL_GetTicks(void)
   110 {
   110 {
   111     if (!ticks_started) {
       
   112         SDL_InitTicks();
       
   113     }
       
   114 
       
   115     DWORD now;
   111     DWORD now;
   116 #ifndef USE_GETTICKCOUNT
   112 #ifndef USE_GETTICKCOUNT
   117     LARGE_INTEGER hires_now;
   113     LARGE_INTEGER hires_now;
   118 #endif
   114 #endif
       
   115 
       
   116     if (!ticks_started) {
       
   117         SDL_InitTicks();
       
   118     }
   119 
   119 
   120 #ifdef USE_GETTICKCOUNT
   120 #ifdef USE_GETTICKCOUNT
   121     now = GetTickCount();
   121     now = GetTickCount();
   122 #else
   122 #else
   123     if (hires_timer_available) {
   123     if (hires_timer_available) {