make ctx.frame_number overflow to 0

This commit is contained in:
veclavtalica 2025-01-11 17:33:05 +03:00
parent 41d0e24780
commit 46e077ba63

View File

@ -237,6 +237,9 @@ static void main_loop(void) {
ctx.frame_accumulator -= ctx.desired_frametime;
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;
}
}