Mercurial > sdl-ios-xcode
diff src/timer/SDL_timer.c @ 3578:0d1b16ee0bca
Fixed bug #741
The thread ID is an unsigned long so it can hold pthread_t so people can do naughty things with it.
I'm going to be adding additional useful thread API functions, but this should prevent crashes in people's existing code on 64-bit architectures.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 16 Dec 2009 04:48:11 +0000 |
parents | 99210400e8b9 |
children | f7b03b6838cb |
line wrap: on
line diff
--- a/src/timer/SDL_timer.c Wed Dec 16 03:02:31 2009 +0000 +++ b/src/timer/SDL_timer.c Wed Dec 16 04:48:11 2009 +0000 @@ -128,7 +128,7 @@ t->last_alarm = now; } #ifdef DEBUG_TIMERS - printf("Executing timer %p (thread = %d)\n", t, SDL_ThreadID()); + printf("Executing timer %p (thread = %lu)\n", t, SDL_ThreadID()); #endif timer = *t; SDL_mutexV(SDL_timer_mutex); @@ -235,7 +235,7 @@ } } #ifdef DEBUG_TIMERS - printf("SDL_RemoveTimer(%08x) = %d num_timers = %d thread = %d\n", + printf("SDL_RemoveTimer(%08x) = %d num_timers = %d thread = %lu\n", (Uint32) id, removed, SDL_timer_running, SDL_ThreadID()); #endif SDL_mutexV(SDL_timer_mutex);