make ctx.frame_number overflow to 0
This commit is contained in:
parent
41d0e24780
commit
46e077ba63
@ -237,6 +237,9 @@ static void main_loop(void) {
|
|||||||
|
|
||||||
ctx.frame_accumulator -= ctx.desired_frametime;
|
ctx.frame_accumulator -= ctx.desired_frametime;
|
||||||
ctx.game.frame_number++;
|
ctx.game.frame_number++;
|
||||||
|
/* TODO: should we ask for reinitialization in such case? */
|
||||||
|
if (ctx.game.frame_number > 16777216)
|
||||||
|
ctx.game.frame_number = 0;
|
||||||
ctx.game.initialization_needed = false;
|
ctx.game.initialization_needed = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user