mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: remove inclusion of SDL headers globally, helps to cleanup code before SDL3 migration
This commit is contained in:
@@ -31,6 +31,7 @@ GNU General Public License for more details.
|
||||
==============================================================================
|
||||
*/
|
||||
double Platform_DoubleTime( void );
|
||||
void Platform_Sleep( int msec );
|
||||
void Platform_ShellExecute( const char *path, const char *parms );
|
||||
void Platform_MessageBox( const char *title, const char *message, qboolean parentMainWindow );
|
||||
void Platform_SetStatus( const char *status );
|
||||
@@ -168,19 +169,6 @@ static inline void Platform_SetupSigtermHandling( void )
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void Platform_Sleep( int msec )
|
||||
{
|
||||
#if XASH_TIMER == TIMER_SDL
|
||||
SDL_Delay( msec );
|
||||
#elif XASH_TIMER == TIMER_POSIX
|
||||
usleep( msec * 1000 );
|
||||
#elif XASH_TIMER == TIMER_WIN32
|
||||
Sleep( msec );
|
||||
#else
|
||||
// stub
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline qboolean Platform_NanoSleep( int nsec )
|
||||
{
|
||||
// SDL2 doesn't have nanosleep, so use low-level functions here
|
||||
|
||||
Reference in New Issue
Block a user