[SDL] High cpu usage

Paul Duffy odubtaig at yahoo.co.uk
Mon Jul 9 17:14:13 PDT 2007


On Mon, 2007-07-09 at 17:48 -0500, David Olsen wrote:
> Adam,
> use SDL_Delay(x) to insert "pauses" in your code...(after the drawing
> routine is usually a good spot.) This will return control back to the
> OS, and reduce CPU usage considerably.
>  x can be any value in milliseconds you like, but 10 is a good
> starting place. THere's no reason to run your game at >100FPS
> anyway... at least not that I can see off-hand.
> 

Well, my monitor /can/ do 1024x768 at 200Hz, but that probably is just a
silly value :D *looks at motion-blur shaders*


		
___________________________________________________________ 
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com


More information about the SDL mailing list