mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
Merge pull request #534 from DavidWyand-GG/Updates
Support graphic cards with 2GB+ VRAM
This commit is contained in:
commit
fd650c4c7a
2 changed files with 13 additions and 1 deletions
|
|
@ -106,6 +106,7 @@ void GFXCardProfiler::init()
|
||||||
Con::printf(" o Chipset : '%s'", getChipString().c_str());
|
Con::printf(" o Chipset : '%s'", getChipString().c_str());
|
||||||
Con::printf(" o Card : '%s'", getCardString().c_str());
|
Con::printf(" o Card : '%s'", getCardString().c_str());
|
||||||
Con::printf(" o Version : '%s'", getVersionString().c_str());
|
Con::printf(" o Version : '%s'", getVersionString().c_str());
|
||||||
|
Con::printf(" o VRAM : %d MB", getVideoMemoryInMB());
|
||||||
|
|
||||||
// Do card-specific setup...
|
// Do card-specific setup...
|
||||||
Con::printf(" - Scanning card capabilities...");
|
Con::printf(" - Scanning card capabilities...");
|
||||||
|
|
|
||||||
|
|
@ -568,9 +568,20 @@ bool WMIVideoInfo::_queryPropertyWMI( const PVIQueryType queryType, const U32 ad
|
||||||
LONG longVal = v.lVal;
|
LONG longVal = v.lVal;
|
||||||
|
|
||||||
if( queryType == PVI_VRAM )
|
if( queryType == PVI_VRAM )
|
||||||
|
{
|
||||||
longVal = longVal >> 20; // Convert to megabytes
|
longVal = longVal >> 20; // Convert to megabytes
|
||||||
|
|
||||||
*outValue = String::ToString( (S32)longVal );
|
// While this value is reported as a signed integer, it is possible
|
||||||
|
// for video cards to have 2GB or more. In those cases the signed
|
||||||
|
// bit is set and will give us a negative number. Treating this
|
||||||
|
// as unsigned will allows us to handle video cards with up to
|
||||||
|
// 4GB of memory. After that we'll need a new solution from Microsoft.
|
||||||
|
*outValue = String::ToString( (U32)longVal );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*outValue = String::ToString( (S32)longVal );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue