From bec584811a9ec5d525f2b31a58f40b2a58780caa Mon Sep 17 00:00:00 2001 From: tma Date: Mon, 14 Sep 2009 12:34:31 +0000 Subject: * Fix warning in cl_main.c * Fix bug #4026 (SDL dx backend doesn't work on some machines) git-svn-id: svn://svn.icculus.org/quake3/trunk@1586 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/sys/sys_local.h | 1 + code/sys/sys_unix.c | 12 ++++++++++++ code/sys/sys_win32.c | 19 +++++++++++++++++++ 3 files changed, 32 insertions(+) (limited to 'code/sys') diff --git a/code/sys/sys_local.h b/code/sys/sys_local.h index a114c79..6174876 100644 --- a/code/sys/sys_local.h +++ b/code/sys/sys_local.h @@ -48,6 +48,7 @@ unsigned int CON_LogRead( char *out, unsigned int outSize ); char *Sys_StripAppBundle( char *pwd ); #endif +void Sys_GLimpSafeInit( void ); void Sys_GLimpInit( void ); void Sys_PlatformInit( void ); void Sys_SigHandler( int signal ); diff --git a/code/sys/sys_unix.c b/code/sys/sys_unix.c index c05fda5..c10a6b2 100644 --- a/code/sys/sys_unix.c +++ b/code/sys/sys_unix.c @@ -516,6 +516,18 @@ void Sys_ErrorDialog( const char *error ) FS_FCloseFile( f ); } +/* +============== +Sys_GLimpSafeInit + +Unix specific "safe" GL implementation initialisation +============== +*/ +void Sys_GLimpSafeInit( void ) +{ + // NOP +} + /* ============== Sys_GLimpInit diff --git a/code/sys/sys_win32.c b/code/sys/sys_win32.c index eeee856..b3d2167 100644 --- a/code/sys/sys_win32.c +++ b/code/sys/sys_win32.c @@ -581,6 +581,25 @@ void Sys_ErrorDialog( const char *error ) static qboolean SDL_VIDEODRIVER_externallySet = qfalse; #endif +/* +============== +Sys_GLimpSafeInit + +Windows specific "safe" GL implementation initialisation +============== +*/ +void Sys_GLimpSafeInit( void ) +{ +#ifndef DEDICATED + if( !SDL_VIDEODRIVER_externallySet ) + { + // Here, we want to let SDL decide what do to unless + // explicitly requested otherwise + _putenv( "SDL_VIDEODRIVER=" ); + } +#endif +} + /* ============== Sys_GLimpInit -- cgit v1.2.3