소스 검색

Merge pull request #320 from DavidWyand-GG/PlatformVideoInfoFix

Fix platforms that don't support PVI_NumAdapters
David Wyand 12 년 전
부모
커밋
2fd3dcb841
1개의 변경된 파일9개의 추가작업 그리고 3개의 파일을 삭제
  1. 9 3
      Engine/source/platform/platformVideoInfo.cpp

+ 9 - 3
Engine/source/platform/platformVideoInfo.cpp

@@ -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;
-
-   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;
    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++ )