engine: platform: as an exception, allow calling direct platform-specific implementations of Platform_Sleep to make them inlined
This commit is contained in:
parent
e14cd758ad
commit
614b9113ad
4 changed files with 3 additions and 21 deletions
|
@ -51,13 +51,11 @@ void IOS_LaunchDialog( void );
|
|||
#if XASH_POSIX
|
||||
void Posix_Daemonize( void );
|
||||
void Posix_SetupSigtermHandling( void );
|
||||
void Posix_Sleep( int msec );
|
||||
#endif
|
||||
|
||||
#if XASH_SDL
|
||||
void SDLash_Init( void );
|
||||
void SDLash_Shutdown( void );
|
||||
void SDLash_Sleep( int msec );
|
||||
#endif
|
||||
|
||||
#if XASH_ANDROID
|
||||
|
@ -78,7 +76,6 @@ void Wcon_ShowConsole( qboolean show );
|
|||
void Wcon_DisableInput( void );
|
||||
char *Wcon_Input( void );
|
||||
void Wcon_WinPrint( const char *pMsg );
|
||||
void Win32_Sleep( int msec );
|
||||
#endif
|
||||
|
||||
#if XASH_NSWITCH
|
||||
|
@ -170,11 +167,11 @@ static inline void Platform_SetupSigtermHandling( void )
|
|||
static inline void Platform_Sleep( int msec )
|
||||
{
|
||||
#if XASH_TIMER == TIMER_SDL
|
||||
SDLash_Sleep( msec );
|
||||
SDL_Delay( msec );
|
||||
#elif XASH_TIMER == TIMER_POSIX
|
||||
Posix_Sleep( msec );
|
||||
usleep( msec * 1000 );
|
||||
#elif XASH_TIMER == TIMER_WIN32
|
||||
Win32_Sleep( msec );
|
||||
Sleep( msec );
|
||||
#else
|
||||
// stub
|
||||
#endif
|
||||
|
|
|
@ -174,8 +174,3 @@ double Platform_DoubleTime( void )
|
|||
}
|
||||
#endif // XASH_TIMER == TIMER_POSIX
|
||||
|
||||
void Posix_Sleep( int msec )
|
||||
{
|
||||
usleep( msec * 1000 );
|
||||
}
|
||||
|
||||
|
|
|
@ -34,11 +34,6 @@ double Platform_DoubleTime( void )
|
|||
}
|
||||
#endif // XASH_TIMER == TIMER_SDL
|
||||
|
||||
void SDLash_Sleep( int msec )
|
||||
{
|
||||
SDL_Delay( msec );
|
||||
}
|
||||
|
||||
#if XASH_MESSAGEBOX == MSGBOX_SDL
|
||||
void Platform_MessageBox( const char *title, const char *message, qboolean parentMainWindow )
|
||||
{
|
||||
|
|
|
@ -36,11 +36,6 @@ double Platform_DoubleTime( void )
|
|||
}
|
||||
#endif // XASH_TIMER == TIMER_WIN32
|
||||
|
||||
void Win32_Sleep( int msec )
|
||||
{
|
||||
Sleep( msec );
|
||||
}
|
||||
|
||||
qboolean Platform_DebuggerPresent( void )
|
||||
{
|
||||
return IsDebuggerPresent();
|
||||
|
|
Loading…
Add table
Reference in a new issue