src/timer/psp/SDL_systimer.c
changeset 7649 4f801cd08f3f
parent 7191 75360622e65f
child 8149 681eb46b8ac4
--- a/src/timer/psp/SDL_systimer.c	Sat Aug 17 09:54:30 2013 -0700
+++ b/src/timer/psp/SDL_systimer.c	Sat Aug 17 18:07:29 2013 -0400
@@ -29,14 +29,24 @@
 #include <pspthreadman.h>
 
 static struct timeval start;
+static SDL_bool ticks_started = SDL_FALSE;
 
-void SDL_StartTicks(void)
+void SDL_InitTicks(void)
 {
+    if (ticks_started) {
+        return;
+    }
+    ticks_started = SDL_TRUE;
+
     gettimeofday(&start, NULL);
 }
 
 Uint32 SDL_GetTicks(void)
 {
+    if (!ticks_started) {
+        SDL_InitTicks();
+    }
+
     struct timeval now;
     Uint32 ticks;