From f446ae943692656b7f950adbe01735df854dcb2d Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 23 Dec 2005 01:58:45 +0000 Subject: [PATCH] use GetMyDocumentsDir, GetApplicationDataDir --- .../arch/ArchHooks/ArchHooks_Win32Static.cpp | 22 ++++--------------- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/stepmania/src/arch/ArchHooks/ArchHooks_Win32Static.cpp b/stepmania/src/arch/ArchHooks/ArchHooks_Win32Static.cpp index 4947bb152f..37d5c8f288 100644 --- a/stepmania/src/arch/ArchHooks/ArchHooks_Win32Static.cpp +++ b/stepmania/src/arch/ArchHooks/ArchHooks_Win32Static.cpp @@ -1,12 +1,12 @@ #include "global.h" #include "ArchHooks.h" #include "RageUtil.h" -#include "archutils/Win32/RegistryAccess.h" +#include "archutils/Win32/SpecialDirs.h" #include "ProductInfo.h" #include "RageFileManager.h" -#include // for timeGetTime +#include #include #if defined(_MSC_VER) #pragma comment(lib, "winmm.lib") @@ -50,22 +50,8 @@ void ArchHooks::MountInitialFilesystems( const CString &sDirOfExecutable ) CString Dir = join( "/", parts.begin(), parts.end()-1 ); FILEMAN->Mount( "dir", Dir, "/" ); - CString sMyDocumentsDir; - { - bool bSuccess = RegistryAccess::GetRegValue( "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "Personal", sMyDocumentsDir ); - ASSERT( bSuccess ); - sMyDocumentsDir.Replace( '\\', '/' ); - sMyDocumentsDir += "/"; - } - - CString sApplicationDataDir; - { - TCHAR szDir[MAX_PATH] = ""; - BOOL bResult = SHGetSpecialFolderPath( NULL, szDir, CSIDL_APPDATA, FALSE ); - ASSERT( bResult ); - sApplicationDataDir = szDir; - sApplicationDataDir += "/"; - } + CString sMyDocumentsDir = GetMyDocumentsDir(); + CString sApplicationDataDir = GetApplicationDataDir(); // Mount everything game-writable (not counting the editor) to the user's directory. FILEMAN->Mount( "dir", sApplicationDataDir + PRODUCT_ID + "/Cache", "/Cache" );