use SDL_Delay to sleep

This commit is contained in:
Glenn Maynard
2003-02-14 06:31:09 +00:00
parent e83979439f
commit 6ca905ef9d
4 changed files with 11 additions and 9 deletions
+3 -4
View File
@@ -29,8 +29,7 @@
#include "arch/ErrorDialog/ErrorDialog.h"
#include "time.h"
#include "SDL.h"
#include "SDL_syswm.h" // for SDL_SysWMinfo
#include "SDL_utils.h"
//
// StepMania global classes
@@ -591,8 +590,8 @@ static void GameLoop()
DISPLAY->Flip();
if(g_bHasFocus)
::Sleep( 0 ); // give some time to other processes and threads
SDL_Delay( 0 ); // give some time to other processes and threads
else
::Sleep( 2 ); // give more time to other processes and threads, but not so much that we skip sound
SDL_Delay( 2 ); // give more time to other processes and threads, but not so much that we skip sound
}
}