engine: remove inclusion of SDL headers globally, helps to cleanup code before SDL3 migration

This commit is contained in:
Alibek Omarov
2025-02-28 13:14:47 +03:00
parent bbbd7711c1
commit a5f0ca38f1
14 changed files with 59 additions and 52 deletions

View File

@@ -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