From d84fa85bb1641bec833b8197e0a86c93bd2646e6 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 6 Jun 2004 07:23:15 +0000 Subject: [PATCH] try to log audio driver file versions --- stepmania/src/arch/Sound/DSoundHelpers.cpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/stepmania/src/arch/Sound/DSoundHelpers.cpp b/stepmania/src/arch/Sound/DSoundHelpers.cpp index aea37a9784..4ba84efb1c 100644 --- a/stepmania/src/arch/Sound/DSoundHelpers.cpp +++ b/stepmania/src/arch/Sound/DSoundHelpers.cpp @@ -2,6 +2,7 @@ #include "DSoundHelpers.h" #include "../../RageUtil.h" #include "../../RageLog.h" +#include "archutils/Win32/GetFileInformation.h" #if defined(_WINDOWS) #include @@ -9,13 +10,27 @@ #define DIRECTSOUND_VERSION 0x0700 #include -#include - #pragma comment(lib, "dsound.lib") BOOL CALLBACK DSound::EnumCallback( LPGUID lpGuid, LPCSTR lpcstrDescription, LPCSTR lpcstrModule, LPVOID lpContext ) { - LOG->Info( "DirectSound Driver: %s (%s)", lpcstrDescription, lpcstrModule ); + CString sLine = ssprintf( "DirectSound Driver: %s", lpcstrDescription ); + if( lpcstrModule[0] ) + { + sLine += ssprintf( " (%s", lpcstrModule ); + + CString sPath = FindSystemFile( lpcstrModule ); + if( sPath != "" ) + { + CString ver; + if( GetFileVersion( sPath, ver ) ) + sLine += ssprintf(" %s", ver.c_str()); + } + + sLine += ")"; + } + + LOG->Info( "%s", sLine.c_str() ); if(lpGuid) LOG->Info( " ID: {%8.8x-%4.4x-%4.4x-%6.6x}", lpGuid->Data1, lpGuid->Data2, lpGuid->Data3, lpGuid->Data4 );