src/timer/dummy/SDL_systimer.c
changeset 7649 4f801cd08f3f
parent 6885 700f1b25f77f
child 8093 b43765095a6f
     1.1 --- a/src/timer/dummy/SDL_systimer.c	Sat Aug 17 09:54:30 2013 -0700
     1.2 +++ b/src/timer/dummy/SDL_systimer.c	Sat Aug 17 18:07:29 2013 -0400
     1.3 @@ -24,14 +24,24 @@
     1.4  
     1.5  #include "SDL_timer.h"
     1.6  
     1.7 +static SDL_bool ticks_started = SDL_FALSE;
     1.8 +
     1.9  void
    1.10 -SDL_StartTicks(void)
    1.11 +SDL_InitTicks(void)
    1.12  {
    1.13 +    if (ticks_started) {
    1.14 +        return;
    1.15 +    }
    1.16 +    ticks_started = SDL_TRUE;
    1.17  }
    1.18  
    1.19  Uint32
    1.20  SDL_GetTicks(void)
    1.21  {
    1.22 +    if (!ticks_started) {
    1.23 +        SDL_InitTicks();
    1.24 +    }
    1.25 +
    1.26      SDL_Unsupported();
    1.27      return 0;
    1.28  }