mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
only create the data directory for a title, not data/nocopy. fixes issue 4453
fs::open does not need to create the data directory, es_diVerify does that. change applied to CBoot::Boot_WiiWAD as well (es_diVerify isn't used for wads). git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7503 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
09d9aab18a
commit
d27753796e
@ -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))
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user