When using SDL_Delay or usleep it seems that my wiz sleeps way too long...
My mainloop is roughly:
int tickStart = SDL_GetTicks();
gameLogic();
draw();
int dTime=SDL_GetTicks()-tickStart;
if(dTime < 16)
SDL_Delay(16-dTime);
On windows and linux this gives the right result, 60 fps, on the wiz however, it gives me 34 fps, and the draw/blit time is around 2 ms on the wiz.
Have anyone experienced the same problem?
My mainloop is roughly:
int tickStart = SDL_GetTicks();
gameLogic();
draw();
int dTime=SDL_GetTicks()-tickStart;
if(dTime < 16)
SDL_Delay(16-dTime);
On windows and linux this gives the right result, 60 fps, on the wiz however, it gives me 34 fps, and the draw/blit time is around 2 ms on the wiz.
Have anyone experienced the same problem?