The in_mouse stuff makes no sense in SDL2

This commit is contained in:
Tim Angus 2013-01-28 09:25:38 +00:00
parent b43f766141
commit b9355c5f12

View file

@ -634,10 +634,6 @@ dialogResult_t Sys_Dialog( dialogType_t type, const char *message, const char *t
} }
} }
#ifndef DEDICATED
static qboolean SDL_VIDEODRIVER_externallySet = qfalse;
#endif
/* /*
============== ==============
Sys_GLimpSafeInit Sys_GLimpSafeInit
@ -647,14 +643,6 @@ Windows specific "safe" GL implementation initialisation
*/ */
void Sys_GLimpSafeInit( void ) 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
} }
/* /*
@ -666,25 +654,6 @@ Windows specific GL implementation initialisation
*/ */
void Sys_GLimpInit( void ) void Sys_GLimpInit( void )
{ {
#ifndef DEDICATED
if( !SDL_VIDEODRIVER_externallySet )
{
// It's a little bit weird having in_mouse control the
// video driver, but from ioq3's point of view they're
// virtually the same except for the mouse input anyway
if( Cvar_VariableIntegerValue( "in_mouse" ) == -1 )
{
// Use the windib SDL backend, which is closest to
// the behaviour of idq3 with in_mouse set to -1
_putenv( "SDL_VIDEODRIVER=windib" );
}
else
{
// Use the DirectX SDL backend
_putenv( "SDL_VIDEODRIVER=directx" );
}
}
#endif
} }
/* /*
@ -698,21 +667,11 @@ void Sys_PlatformInit( void )
{ {
#ifndef DEDICATED #ifndef DEDICATED
TIMECAPS ptc; TIMECAPS ptc;
const char *SDL_VIDEODRIVER = getenv( "SDL_VIDEODRIVER" );
#endif #endif
Sys_SetFloatEnv(); Sys_SetFloatEnv();
#ifndef DEDICATED #ifndef DEDICATED
if( SDL_VIDEODRIVER )
{
Com_Printf( "SDL_VIDEODRIVER is externally set to \"%s\", "
"in_mouse -1 will have no effect\n", SDL_VIDEODRIVER );
SDL_VIDEODRIVER_externallySet = qtrue;
}
else
SDL_VIDEODRIVER_externallySet = qfalse;
if(timeGetDevCaps(&ptc, sizeof(ptc)) == MMSYSERR_NOERROR) if(timeGetDevCaps(&ptc, sizeof(ptc)) == MMSYSERR_NOERROR)
{ {
timerResolution = ptc.wPeriodMin; timerResolution = ptc.wPeriodMin;