mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 13:49:53 -06:00
Added Open Wii save folder menu item to GameListCtrl, fixed a few remaining path and casting problems
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3135 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -206,3 +206,29 @@ const std::string& GameListItem::GetName(int index) const
|
||||
return m_Name[0];
|
||||
}
|
||||
|
||||
const std::string GameListItem::GetWiiFSPath() const
|
||||
{
|
||||
DiscIO::IVolume *Iso = DiscIO::CreateVolumeFromFilename(m_FileName);
|
||||
|
||||
if (Iso != NULL)
|
||||
{
|
||||
if (DiscIO::IsVolumeWiiDisc(Iso))
|
||||
{
|
||||
char Path[250];
|
||||
u64 Title;
|
||||
|
||||
Iso->RAWRead((u64)0x0F8001DC, 8, (u8*)&Title);
|
||||
Title = Common::swap64(Title);
|
||||
|
||||
sprintf(Path, FULL_WII_USER_DIR "title/%08x/%08x/data/", (u32)(Title>>32), (u32)Title);
|
||||
|
||||
if (!File::Exists(Path))
|
||||
File::CreateFullPath(Path);
|
||||
|
||||
return std::string(wxGetCwd().mb_str()) + std::string(Path).substr(strlen(ROOT_DIR));
|
||||
}
|
||||
}
|
||||
|
||||
return "NULL";
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user