aboutsummaryrefslogtreecommitdiffstats
path: root/code/sys
diff options
context:
space:
mode:
Diffstat (limited to 'code/sys')
-rw-r--r--code/sys/sys_local.h1
-rw-r--r--code/sys/sys_unix.c12
-rw-r--r--code/sys/sys_win32.c19
3 files changed, 32 insertions, 0 deletions
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
@@ -518,6 +518,18 @@ void Sys_ErrorDialog( const char *error )
/*
==============
+Sys_GLimpSafeInit
+
+Unix specific "safe" GL implementation initialisation
+==============
+*/
+void Sys_GLimpSafeInit( void )
+{
+ // NOP
+}
+
+/*
+==============
Sys_GLimpInit
Unix specific GL implementation initialisation
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
@@ -583,6 +583,25 @@ static qboolean SDL_VIDEODRIVER_externallySet = qfalse;
/*
==============
+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
Windows specific GL implementation initialisation