use SDL_Delay to sleep
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user