diff --git a/Source/Core/Core/Src/Boot/Boot_WiiWAD.cpp b/Source/Core/Core/Src/Boot/Boot_WiiWAD.cpp index 3646678f87..4f5af5cfdb 100644 --- a/Source/Core/Core/Src/Boot/Boot_WiiWAD.cpp +++ b/Source/Core/Core/Src/Boot/Boot_WiiWAD.cpp @@ -29,6 +29,7 @@ #include "Boot_DOL.h" #include "Volume.h" #include "VolumeCreator.h" +#include "CommonPaths.h" bool CBoot::IsWiiWAD(const char *filename) @@ -42,15 +43,8 @@ bool CBoot::Boot_WiiWAD(const char* _pFilename) if (!ContentLoader.IsValid()) return false; - // create Home directory - char Path[260+1]; - u64 TitleID = ContentLoader.GetTitleID(); - char* pTitleID = (char*)&TitleID; - sprintf(Path, "%stitle/%02x%02x%02x%02x/%02x%02x%02x%02x/data/nocopy/", - File::GetUserPath(D_WIIUSER_IDX).c_str(), - (u8)pTitleID[7], (u8)pTitleID[6], (u8)pTitleID[5], (u8)pTitleID[4], - (u8)pTitleID[3], (u8)pTitleID[2], (u8)pTitleID[1], (u8)pTitleID[0]); - File::CreateFullPath(Path); + // create data directory + File::CreateFullPath(Common::CreateTitleDataPath(ContentLoader.GetTitleID()) + DIR_SEP); // setup wii mem if (!SetupWiiMemory(ContentLoader.GetCountry())) @@ -85,7 +79,6 @@ bool CBoot::Boot_WiiWAD(const char* _pFilename) return true; } - u64 CBoot::Install_WiiWAD(const char* _pFilename) { if (!IsWiiWAD(_pFilename)) diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.cpp index 759688a674..7e73369513 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.cpp @@ -51,26 +51,6 @@ bool CWII_IPC_HLE_Device_fs::Open(u32 _CommandAddress, u32 _Mode) File::CreateDir(Path.c_str()); } - // create home directory - if (VolumeHandler::IsValid()) - { - char Path[260+1]; - u32 TitleID, GameID; - VolumeHandler::RAWReadToPtr((u8*)&TitleID, 0x0F8001DC, 4); - - TitleID = Common::swap32(TitleID); - GameID = VolumeHandler::Read32(0); - - _dbg_assert_(WII_IPC_FILEIO, GameID != 0); - if (GameID == 0) GameID = 0xF00DBEEF; - if (TitleID == 0) TitleID = 0x00010000; - - snprintf(Path, sizeof(Path), "%stitle/%08x/%08x/data/nocopy/", - File::GetUserPath(D_WIIUSER_IDX).c_str(), TitleID, GameID); - - File::CreateFullPath(Path); - } - Memory::Write_U32(GetDeviceID(), _CommandAddress+4); m_Active = true; return true;