diff options
Diffstat (limited to 'code/sys/sys_win32.c')
-rw-r--r-- | code/sys/sys_win32.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/code/sys/sys_win32.c b/code/sys/sys_win32.c index fb924e6..79998dc 100644 --- a/code/sys/sys_win32.c +++ b/code/sys/sys_win32.c @@ -514,7 +514,7 @@ void Sys_FreeFileList( char **list ) ============== Sys_Sleep -Block execution for msec or until input is recieved. +Block execution for msec or until input is received. ============== */ void Sys_Sleep( int msec ) @@ -522,10 +522,18 @@ void Sys_Sleep( int msec ) if( msec == 0 ) return; +#ifdef DEDICATED if( msec < 0 ) WaitForSingleObject( GetStdHandle( STD_INPUT_HANDLE ), INFINITE ); else WaitForSingleObject( GetStdHandle( STD_INPUT_HANDLE ), msec ); +#else + // Client Sys_Sleep doesn't support waiting on stdin + if( msec < 0 ) + return; + + Sleep( msec ); +#endif } /* @@ -568,3 +576,18 @@ void Sys_ErrorDialog( const char *error ) } } } + +/* +============== +Sys_PlatformInit + +Windows specific initialisation +============== +*/ +void Sys_PlatformInit( void ) +{ +#ifndef DEDICATED + // Force the DirectX SDL backend to be used + _putenv( "SDL_VIDEODRIVER=directx" ); +#endif +} |