From 7d208b71c02a3fc059570223b978f70f44c5e50a Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 29 Aug 2003 04:44:03 +0000 Subject: [PATCH] Give up CPU on all archs when we don't have focus. --- stepmania/src/StepMania.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index c369483262..2258a6bc74 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -879,12 +879,14 @@ static void GameLoop() */ SCREENMAN->Draw(); - /* This is unneeded in OS X. The OS handles all of this for us. */ -#if !defined(DARWIN) - if(g_bHasFocus) - SDL_Delay( 1 ); // give some time to other processes and threads - else + /* If we don't have focus, give up lots of CPU. */ + if( !g_bHasFocus ) SDL_Delay( 10 );// give some time to other processes and threads +#if defined(_WINDOWS) + /* In Windows, we want to give up some CPU for other threads. Most OS's do + * this more intelligently. */ + else + SDL_Delay( 1 ); // give some time to other processes and threads #endif } }