mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
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
|
@ -684,7 +684,7 @@ static int clix_handle_game(struct clix_game_state_t* state)
|
|||
|
||||
while(true)
|
||||
{
|
||||
if (blink_tick < *rb->current_tick) {
|
||||
if (TIME_AFTER(*rb->current_tick, blink_tick)) {
|
||||
state->blink = state->blink ? false : true;
|
||||
blink_tick = *rb->current_tick + BLINK_TICKCOUNT;
|
||||
}
|
||||
|
@ -692,7 +692,7 @@ static int clix_handle_game(struct clix_game_state_t* state)
|
|||
time = 6; /* number of ticks this function will loop reading keys */
|
||||
start = *rb->current_tick;
|
||||
end = start + time;
|
||||
while(end > *rb->current_tick)
|
||||
while(TIME_BEFORE(*rb->current_tick, end))
|
||||
{
|
||||
oldx = state->x;
|
||||
oldy = state->y;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue