comparison src/timer/macos/SDL_systimer.c @ 1810:4c270c3a88ed

Fixed bug #225 Making the old code limp along, for Carbon builds.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 11 May 2006 03:19:03 +0000
parents 92947e3a18db
children 1834c192d89f
comparison
equal deleted inserted replaced
1809:41ab83bec62f 1810:4c270c3a88ed
34 #include "SDL_timer.h" 34 #include "SDL_timer.h"
35 #include "../SDL_timer_c.h" 35 #include "../SDL_timer_c.h"
36 36
37 #include "FastTimes.h" 37 #include "FastTimes.h"
38 38
39 #ifdef TARGET_API_MAC_CARBON
40 #define NewTimerProc NewTimerUPP
41 #endif
42
39 #define MS_PER_TICK (1000.0/60.0) /* MacOS tick = 1/60 second */ 43 #define MS_PER_TICK (1000.0/60.0) /* MacOS tick = 1/60 second */
40 44
41 45
42 #define kTwoPower32 (4294967296.0) /* 2^32 */ 46 #define kTwoPower32 (4294967296.0) /* 2^32 */
43 47
65 { 69 {
66 Uint32 stop, now; 70 Uint32 stop, now;
67 71
68 stop = SDL_GetTicks() + ms; 72 stop = SDL_GetTicks() + ms;
69 do { 73 do {
74 #ifdef TARGET_API_MAC_CARBON
75 MPYield();
76 #else
70 SystemTask(); 77 SystemTask();
78 #endif
71 79
72 now = SDL_GetTicks(); 80 now = SDL_GetTicks();
73 81
74 } while ( stop > now ); 82 } while ( stop > now );
75 } 83 }