diff options
Diffstat (limited to 'apps/plugins/brickmania.c')
-rw-r--r-- | apps/plugins/brickmania.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index 3f79f7c7d6..9bf4cf2b06 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c | |||
@@ -1067,7 +1067,7 @@ static void brickmania_sleep(int secs) | |||
1067 | { | 1067 | { |
1068 | if (count == 0) | 1068 | if (count == 0) |
1069 | count = *rb->current_tick + HZ*secs; | 1069 | count = *rb->current_tick + HZ*secs; |
1070 | if ( (*rb->current_tick >= count) && (vscore == score) ) | 1070 | if ( (TIME_AFTER(*rb->current_tick, count)) && (vscore == score) ) |
1071 | done = true; | 1071 | done = true; |
1072 | 1072 | ||
1073 | if(vscore != score) | 1073 | if(vscore != score) |
@@ -1323,7 +1323,7 @@ static int brickmania_game_loop(void) | |||
1323 | 1323 | ||
1324 | if (flip_sides) | 1324 | if (flip_sides) |
1325 | { | 1325 | { |
1326 | if (*rb->current_tick>=sec_count) | 1326 | if (TIME_AFTER(*rb->current_tick, sec_count)) |
1327 | { | 1327 | { |
1328 | sec_count=*rb->current_tick+HZ; | 1328 | sec_count=*rb->current_tick+HZ; |
1329 | if (num_count!=0) | 1329 | if (num_count!=0) |
@@ -2111,7 +2111,7 @@ static int brickmania_game_loop(void) | |||
2111 | rb->yield(); | 2111 | rb->yield(); |
2112 | 2112 | ||
2113 | /* Sleep for a bit if there is time to spare */ | 2113 | /* Sleep for a bit if there is time to spare */ |
2114 | if (end > *rb->current_tick) | 2114 | if (TIME_BEFORE(*rb->current_tick, end)) |
2115 | rb->sleep(end-*rb->current_tick); | 2115 | rb->sleep(end-*rb->current_tick); |
2116 | } | 2116 | } |
2117 | return 0; | 2117 | return 0; |