[SDL] High cpu usage
Patricia Curtis
patricia.curtis at gmail.com
Mon Jul 9 21:45:27 PDT 2007
Hi
I had the same problem and i found this on the sdl mailing list , so In
your main loop add somthing like this
this_tick = SDL_GetTicks();
if ( this_tick < next_tick )
{
SDL_Delay(next_tick-this_tick);
}
next_tick = this_tick + (1000/FRAMES_PER_SEC);
SDL_Flip(gScreen);
Trish x
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070710/bfc96ea3/attachment.htm
More information about the SDL
mailing list