mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 08:04:40 +00:00
Fix platforms that don't support PVI_NumAdapters
Not all platforms currently support the PVI_NumAdapters query from PlatformVideoInfo. This fix puts in the assumption that there is always 1 adapter if the PVI_NumAdapaters query returns false. This was the behaviour prior to PVI_NumAdapters being put in place.
This commit is contained in:
parent
a841337428
commit
4f4c496fba
1 changed files with 9 additions and 3 deletions
|
|
@ -52,9 +52,15 @@ bool PlatformVideoInfo::profileAdapters()
|
||||||
String tempString;
|
String tempString;
|
||||||
|
|
||||||
if( !_queryProperty( PVI_NumAdapters, 0, &tempString ) )
|
if( !_queryProperty( PVI_NumAdapters, 0, &tempString ) )
|
||||||
return false;
|
{
|
||||||
|
// Not all platforms may support PVI_NumAdapters. We will assume that there
|
||||||
mAdapters.increment( dAtoi( tempString ) );
|
// is one adapter. This was the behavior before PVI_NumAdapters was implemented.
|
||||||
|
mAdapters.increment( 1 );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mAdapters.increment( dAtoi( tempString ) );
|
||||||
|
}
|
||||||
|
|
||||||
U32 adapterNum = 0;
|
U32 adapterNum = 0;
|
||||||
for( Vector<PVIAdapter>::iterator itr = mAdapters.begin(); itr != mAdapters.end(); itr++ )
|
for( Vector<PVIAdapter>::iterator itr = mAdapters.begin(); itr != mAdapters.end(); itr++ )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue