Fix for the "Old Video Drivers" error in nVidia's latest
by Jeremiah Moss · in Torque Game Engine Advanced · 03/24/2007 (10:16 pm) · 4 replies
Getting "Old Video Drivers" for the latest nVidia drivers? Here's the fix!
In the latest drivers released by nVidia for Vista, the 6 in their display drivers changed to a 7, and the other digits got reset, and since the first digit was being ignored, it made torque think the drivers are older than they really are.
Found in comment: "where the #s we care about are the last digits" - yeah, famous last words. I'm surprised a fellow programmer actually thought the first digit was unimportant :(.
Well, anyways, here is the fix:
In DXDiagNVUtil.cpp:
Find the "DXDiagNVUtil::GetDisplayDeviceNVDriverVersion" function, and replace it with this:
In the latest drivers released by nVidia for Vista, the 6 in their display drivers changed to a 7, and the other digits got reset, and since the first digit was being ignored, it made torque think the drivers are older than they really are.
Found in comment: "where the #s we care about are the last digits" - yeah, famous last words. I'm surprised a fellow programmer actually thought the first digit was unimportant :(.
Well, anyways, here is the fix:
In DXDiagNVUtil.cpp:
Find the "DXDiagNVUtil::GetDisplayDeviceNVDriverVersion" function, and replace it with this:
HRESULT DXDiagNVUtil::GetDisplayDeviceNVDriverVersion( DWORD dwDevice, float * fVersion )
{
HRESULT hr = S_OK;
FAIL_IF_NULL( fVersion );
*fVersion = 0.0f;
wstring wstr;
wstring majorVers;
hr = GetDisplayDeviceDriverVersionStr( dwDevice, & wstr );
MSG_IF( FAILED(hr), "GetDisplayDeviceNVDriverVersion() couldn't get driver version string\n");
RET_VAL_IF_FAILED(hr);
// nv driver string will be something like: "6.14.0010.5216"
size_t pos;
pos = wstr.find_last_of( '.' );
majorVers = wstr.substr(0, pos);
wstr.erase( 0, pos );
//FMsgW(L"wstr: %s\n", wstr.c_str() );
// decode the string
// multiply by 100 to convert .5216 into 52.16
// and add back in major version number
// " - 6.0f" for compatibility reasons:
// older versions of this code didn't add back in the major version number
if( (float) hackWToF( majorVers ) >= 6.0f )
{
*fVersion = (((float) hackWToF( majorVers ) - 6.0f) + (float) hackWToF( wstr )) * 100.0f;
} else {
*fVersion = (float) hackWToF( wstr ) * 100.0f;
}
return( hr );
}
#2
11/07/2007 (8:17 am)
This is quite helpful. I have been trying to help a Demo user who was getting this error. Unfortunately, he could not recompile the source code to fix it.
#3
This is needed due to Vista anyway where the versions started with single digits again
11/07/2007 (8:47 am)
You actually can fix it quite simple by just adding 0 as min revision into the cs files.This is needed due to Vista anyway where the versions started with single digits again
#4
11/07/2007 (9:02 am)
Cool. I learned something new today. I love that!
Torque Owner Jeremiah Moss