SDL_Delay -> usleep
This commit is contained in:
@@ -23,7 +23,6 @@
|
||||
#include "GameManager.h"
|
||||
#include "InputMapper.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "SDL_utils.h"
|
||||
#include "RageSounds.h"
|
||||
|
||||
#define NEXT_SCREEN THEME->GetMetric (m_sName,"NextScreen")
|
||||
@@ -115,7 +114,7 @@ void ScreenAttract::AttractInput( const DeviceInput& DeviceI, const InputEventTy
|
||||
/* We already played the coin sound. Don't play it again. */
|
||||
if( MenuI.button != MENU_BUTTON_COIN )
|
||||
SCREENMAN->PlayCoinSound();
|
||||
SDL_Delay( (int)(JOIN_PAUSE_SECONDS*1000) ); // do a little pause, like the arcade does
|
||||
usleep( (int)(JOIN_PAUSE_SECONDS*1000000) ); // do a little pause, like the arcade does
|
||||
LOG->Trace("ScreenAttract::AttractInput: go to ScreenTitleMenu" );
|
||||
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
|
||||
break;
|
||||
|
||||
@@ -76,7 +76,7 @@ InputHandler_DInput::InputHandler_DInput()
|
||||
g_NumJoysticks = 0;
|
||||
|
||||
AppInstance inst;
|
||||
HRESULT hr = DirectInputCreate(/* SDL_Instance */inst.Get(), DIRECTINPUT_VERSION, &dinput, NULL);
|
||||
HRESULT hr = DirectInputCreate(inst.Get(), DIRECTINPUT_VERSION, &dinput, NULL);
|
||||
if ( hr != DI_OK )
|
||||
RageException::Throw( hr_ssprintf(hr, "InputHandler_DInput: DirectInputCreate") );
|
||||
|
||||
@@ -489,7 +489,7 @@ void InputHandler_DInput::InputThreadMain()
|
||||
|
||||
/* If we have no buffered devices, we didn't delay at WaitForMultipleObjectsEx. */
|
||||
if( BufferedDevices.size() == 0 )
|
||||
SDL_Delay( 50 );
|
||||
usleep( 50000 );
|
||||
CHECKPOINT;
|
||||
}
|
||||
CHECKPOINT;
|
||||
|
||||
@@ -864,7 +864,7 @@ void MovieTexture_FFMpeg::DecoderThread()
|
||||
if( m_State == PAUSE_DECODER )
|
||||
{
|
||||
/* We aren't feeding frames, so we aren't waiting; don't chew CPU. */
|
||||
SDL_Delay( 10 );
|
||||
usleep( 10000 );
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -882,7 +882,7 @@ void MovieTexture_FFMpeg::DecoderThread()
|
||||
}
|
||||
|
||||
if( fTime > 0 )
|
||||
SDL_Delay( int(1000*fTime) );
|
||||
usleep( int(1000000*fTime) );
|
||||
|
||||
{
|
||||
/* The only reason m_BufferFinished might be non-zero right now (before
|
||||
|
||||
Reference in New Issue
Block a user