Changed: Use OpenGL by default with an ATI card and without a warning dialog

This commit is contained in:
kervala 2013-02-01 21:58:05 +01:00
parent f370f767ef
commit be0cd80674

View file

@ -533,31 +533,6 @@ void checkDriverVersion()
nlwarning ("Can't check video driver version"); nlwarning ("Can't check video driver version");
} }
void checkNoATIOpenGL()
{
string deviceName;
uint64 driverVersion;
if (CSystemInfo::getVideoInfo (deviceName, driverVersion))
{
string lwr = deviceName;
strlwr(lwr);
if (lwr.find (ATI_RECOMMANDED_DRIVERS_STRING_TEST)!=string::npos && ClientCfg.Driver3D==CClientConfig::OpenGL)
{
// special case for radeon 7500 or less : doesn't issue message since doesn't work with Direct3D for now
if (!(strstr(lwr.c_str() , "radeon 7000") || strstr(lwr.c_str() , "radeon 7200") || strstr(lwr.c_str() , "radeon 7500")))
{
ucstring message= CI18N::get("uiUseATID3D");
if (ClientQuestion (message))
{
ClientCfg.Driver3D= CClientConfig::DrvAuto;
ClientCfg.writeString("Driver3D", "Auto");
ClientCfg.ConfigFile.save();
}
}
}
}
}
void checkDriverDepth () void checkDriverDepth ()
{ {
// Check desktop is in 32 bit else no window mode allowed. // Check desktop is in 32 bit else no window mode allowed.
@ -815,8 +790,6 @@ void prelogInit()
// Check driver version // Check driver version
checkDriverVersion(); checkDriverVersion();
// Check ATI not in OpenGL
checkNoATIOpenGL();
// Create the driver (most important part of the client). // Create the driver (most important part of the client).
nmsg = "Creating 3d driver..."; nmsg = "Creating 3d driver...";
ProgressBar.newMessage ( ClientCfg.buildLoadingString(nmsg) ); ProgressBar.newMessage ( ClientCfg.buildLoadingString(nmsg) );
@ -831,21 +804,12 @@ void prelogInit()
switch(ClientCfg.Driver3D) switch(ClientCfg.Driver3D)
{ {
case CClientConfig::DrvAuto:
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
{
// Fallback to D3D for card other than nVidia
std::string deviceName;
uint64 drvVersion;
CSystemInfo::getVideoInfo(deviceName, drvVersion);
strlwr(deviceName);
driver = strstr(deviceName.c_str(), NVIDIA_RECOMMANDED_DRIVERS_STRING_TEST) == NULL ? UDriver::Direct3d:UDriver::OpenGl;
}
break;
case CClientConfig::Direct3D: case CClientConfig::Direct3D:
driver = UDriver::Direct3d; driver = UDriver::Direct3d;
break; break;
#endif // NL_OS_WINDOWS #endif // NL_OS_WINDOWS
case CClientConfig::DrvAuto:
case CClientConfig::OpenGL: case CClientConfig::OpenGL:
driver = UDriver::OpenGl; driver = UDriver::OpenGl;
break; break;