From 4f4c496fba34da35c799a535a0d26d0e9da366b3 Mon Sep 17 00:00:00 2001 From: DavidWyand-GG Date: Tue, 9 Apr 2013 13:20:19 -0400 Subject: [PATCH] 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. --- Engine/source/platform/platformVideoInfo.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Engine/source/platform/platformVideoInfo.cpp b/Engine/source/platform/platformVideoInfo.cpp index 197c02277..1d8b564a9 100644 --- a/Engine/source/platform/platformVideoInfo.cpp +++ b/Engine/source/platform/platformVideoInfo.cpp @@ -52,9 +52,15 @@ bool PlatformVideoInfo::profileAdapters() String tempString; if( !_queryProperty( PVI_NumAdapters, 0, &tempString ) ) - return false; - - mAdapters.increment( dAtoi( tempString ) ); + { + // Not all platforms may support PVI_NumAdapters. We will assume that there + // is one adapter. This was the behavior before PVI_NumAdapters was implemented. + mAdapters.increment( 1 ); + } + else + { + mAdapters.increment( dAtoi( tempString ) ); + } U32 adapterNum = 0; for( Vector::iterator itr = mAdapters.begin(); itr != mAdapters.end(); itr++ )