forked from len0rd/rockbox
Use wrap-safe TIME_BEFORE/TIME_AFTER macros to compare times with current_time, instead of comparing them directly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23246 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1c64a4d3e0
commit
d24d885aa4
14 changed files with 29 additions and 30 deletions
|
@ -1067,7 +1067,7 @@ static void brickmania_sleep(int secs)
|
|||
{
|
||||
if (count == 0)
|
||||
count = *rb->current_tick + HZ*secs;
|
||||
if ( (*rb->current_tick >= count) && (vscore == score) )
|
||||
if ( (TIME_AFTER(*rb->current_tick, count)) && (vscore == score) )
|
||||
done = true;
|
||||
|
||||
if(vscore != score)
|
||||
|
@ -1323,7 +1323,7 @@ static int brickmania_game_loop(void)
|
|||
|
||||
if (flip_sides)
|
||||
{
|
||||
if (*rb->current_tick>=sec_count)
|
||||
if (TIME_AFTER(*rb->current_tick, sec_count))
|
||||
{
|
||||
sec_count=*rb->current_tick+HZ;
|
||||
if (num_count!=0)
|
||||
|
@ -2111,7 +2111,7 @@ static int brickmania_game_loop(void)
|
|||
rb->yield();
|
||||
|
||||
/* Sleep for a bit if there is time to spare */
|
||||
if (end > *rb->current_tick)
|
||||
if (TIME_BEFORE(*rb->current_tick, end))
|
||||
rb->sleep(end-*rb->current_tick);
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue