On Thu, May 04, 2006 at 04:55:50PM +0200, Ondrej Sury wrote:

> > Blobwars uses a busy-loop for timing purposes. This makes it use 100%
> > CPU all the time, even when it is not doing anything useful. The
> > attached patch removes the busy-loops and replaces them with
> > calls to SDL_Delay().
> 
> Thanks for the patch.  I will send it upstream as well.  But before I
> have one question: why did you added those SDL_Delay(16) on all over
> places in code...  I am sure that upstream will ask as well...

I made the patches last year and already sent them upstream, but they
don't update Blobwars and Starfighter anymore. 16 ticks equals
approximately 60 Hz, which is the framerate Blobwars and Starfighter try
to use. Sometimes there is a large while() or for() loop that displays
stuff in an endless loop (for example, a title screen, a menu, pause
screen, etc), but does not contain any timing code, but still uses 100%
CPU. It is those places where I added the SDL_Delay(16) statements.

-- 
Met vriendelijke groet / with kind regards,
    Guus Sliepen <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: Digital signature

Reply via email to