From 436300861cd6c3af381ee001f3291e029016dd45 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 8 Jan 2004 08:20:00 +0000 Subject: [PATCH] Fix incorrect "Couldn't find primary display driver; logging all drivers": --- stepmania/src/archutils/Win32/VideoDriverInfo.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stepmania/src/archutils/Win32/VideoDriverInfo.cpp b/stepmania/src/archutils/Win32/VideoDriverInfo.cpp index 989f10767d..ba1f7f5a9a 100644 --- a/stepmania/src/archutils/Win32/VideoDriverInfo.cpp +++ b/stepmania/src/archutils/Win32/VideoDriverInfo.cpp @@ -7,11 +7,11 @@ static void GetRegSubKeys( HKEY hKey, vector &lst ) { char szBuffer[MAX_PATH]; - DWORD nSize = sizeof(szBuffer)-1; FILETIME ft; for( int index = 0; ; ++index ) { + DWORD nSize = sizeof(szBuffer)-1; LONG ret = RegEnumKeyEx( hKey, index, szBuffer, &nSize, NULL, NULL, NULL, &ft); if( ret == ERROR_NO_MORE_ITEMS ) return; @@ -123,7 +123,11 @@ bool GetVideoDriverInfo(int cardno, VideoDriverInfo &info) { /* Remove all keys that aren't four characters long ("Properties"). */ if( lst[i].size() != 4 ) + { lst.erase( lst.begin()+i ); + continue; + } + lst[i] = TopKey + "\\" + lst[i]; }