mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2025-01-18 21:51:37 +00:00
* Fix warning in cl_main.c
* Fix bug #4026 (SDL dx backend doesn't work on some machines)
This commit is contained in:
parent
2bd4c89203
commit
64a0a078d2
5 changed files with 53 additions and 17 deletions
|
@ -2104,7 +2104,7 @@ void CL_CheckForResend( void ) {
|
||||||
// The challenge request shall be followed by a client challenge so no malicious server can hijack this connection.
|
// The challenge request shall be followed by a client challenge so no malicious server can hijack this connection.
|
||||||
Com_sprintf(data, sizeof(data), "getchallenge %d", clc.challenge);
|
Com_sprintf(data, sizeof(data), "getchallenge %d", clc.challenge);
|
||||||
|
|
||||||
NET_OutOfBandPrint(NS_CLIENT, clc.serverAddress, data);
|
NET_OutOfBandPrint(NS_CLIENT, clc.serverAddress, "%s", data);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CA_CHALLENGING:
|
case CA_CHALLENGING:
|
||||||
|
|
|
@ -665,31 +665,35 @@ of OpenGL
|
||||||
*/
|
*/
|
||||||
void GLimp_Init( void )
|
void GLimp_Init( void )
|
||||||
{
|
{
|
||||||
qboolean success = qtrue;
|
|
||||||
|
|
||||||
r_allowSoftwareGL = ri.Cvar_Get( "r_allowSoftwareGL", "0", CVAR_LATCH );
|
r_allowSoftwareGL = ri.Cvar_Get( "r_allowSoftwareGL", "0", CVAR_LATCH );
|
||||||
r_sdlDriver = ri.Cvar_Get( "r_sdlDriver", "", CVAR_ROM );
|
r_sdlDriver = ri.Cvar_Get( "r_sdlDriver", "", CVAR_ROM );
|
||||||
|
|
||||||
Sys_GLimpInit( );
|
Sys_GLimpInit( );
|
||||||
|
|
||||||
// create the window and set up the context
|
// Create the window and set up the context
|
||||||
if( !GLimp_StartDriverAndSetMode( r_mode->integer, r_fullscreen->integer ) )
|
if( GLimp_StartDriverAndSetMode( r_mode->integer, r_fullscreen->integer ) )
|
||||||
|
goto success;
|
||||||
|
|
||||||
|
// Try again, this time in a platform specific "safe mode"
|
||||||
|
Sys_GLimpSafeInit( );
|
||||||
|
|
||||||
|
if( GLimp_StartDriverAndSetMode( r_mode->integer, r_fullscreen->integer ) )
|
||||||
|
goto success;
|
||||||
|
|
||||||
|
// Finally, try the default screen resolution
|
||||||
|
if( r_mode->integer != R_MODE_FALLBACK )
|
||||||
{
|
{
|
||||||
if( r_mode->integer != R_MODE_FALLBACK )
|
ri.Printf( PRINT_ALL, "Setting r_mode %d failed, falling back on r_mode %d\n",
|
||||||
{
|
r_mode->integer, R_MODE_FALLBACK );
|
||||||
ri.Printf( PRINT_ALL, "Setting r_mode %d failed, falling back on r_mode %d\n",
|
|
||||||
r_mode->integer, R_MODE_FALLBACK );
|
if( GLimp_StartDriverAndSetMode( R_MODE_FALLBACK, r_fullscreen->integer ) )
|
||||||
ri.Cvar_Set("r_ext_multisample", "0");
|
goto success;
|
||||||
if( !GLimp_StartDriverAndSetMode( R_MODE_FALLBACK, r_fullscreen->integer ) )
|
|
||||||
success = qfalse;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
success = qfalse;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !success )
|
// Nothing worked, give up
|
||||||
ri.Error( ERR_FATAL, "GLimp_Init() - could not load OpenGL subsystem\n" );
|
ri.Error( ERR_FATAL, "GLimp_Init() - could not load OpenGL subsystem\n" );
|
||||||
|
|
||||||
|
success:
|
||||||
// This values force the UI to disable driver selection
|
// This values force the UI to disable driver selection
|
||||||
glConfig.driverType = GLDRV_ICD;
|
glConfig.driverType = GLDRV_ICD;
|
||||||
glConfig.hardwareType = GLHW_GENERIC;
|
glConfig.hardwareType = GLHW_GENERIC;
|
||||||
|
|
|
@ -48,6 +48,7 @@ unsigned int CON_LogRead( char *out, unsigned int outSize );
|
||||||
char *Sys_StripAppBundle( char *pwd );
|
char *Sys_StripAppBundle( char *pwd );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void Sys_GLimpSafeInit( void );
|
||||||
void Sys_GLimpInit( void );
|
void Sys_GLimpInit( void );
|
||||||
void Sys_PlatformInit( void );
|
void Sys_PlatformInit( void );
|
||||||
void Sys_SigHandler( int signal );
|
void Sys_SigHandler( int signal );
|
||||||
|
|
|
@ -516,6 +516,18 @@ void Sys_ErrorDialog( const char *error )
|
||||||
FS_FCloseFile( f );
|
FS_FCloseFile( f );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
==============
|
||||||
|
Sys_GLimpSafeInit
|
||||||
|
|
||||||
|
Unix specific "safe" GL implementation initialisation
|
||||||
|
==============
|
||||||
|
*/
|
||||||
|
void Sys_GLimpSafeInit( void )
|
||||||
|
{
|
||||||
|
// NOP
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==============
|
==============
|
||||||
Sys_GLimpInit
|
Sys_GLimpInit
|
||||||
|
|
|
@ -581,6 +581,25 @@ void Sys_ErrorDialog( const char *error )
|
||||||
static qboolean SDL_VIDEODRIVER_externallySet = qfalse;
|
static qboolean SDL_VIDEODRIVER_externallySet = qfalse;
|
||||||
#endif
|
#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
|
Sys_GLimpInit
|
||||||
|
|
Loading…
Reference in a new issue