mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
DiscIO: Do swapping in GetTitleID implementations
Gets rid of external swaps at every usage.
This commit is contained in:
@ -947,12 +947,11 @@ void CGameListCtrl::OnExportSave(wxCommandEvent& WXUNUSED (event))
|
||||
if (!iso)
|
||||
return;
|
||||
|
||||
u64 title;
|
||||
u64 title_id;
|
||||
std::unique_ptr<DiscIO::IVolume> volume(DiscIO::CreateVolumeFromFilename(iso->GetFileName()));
|
||||
if (volume && volume->GetTitleID((u8*)&title))
|
||||
if (volume && volume->GetTitleID(&title_id))
|
||||
{
|
||||
title = Common::swap64(title);
|
||||
CWiiSaveCrypted::ExportWiiSave(title);
|
||||
CWiiSaveCrypted::ExportWiiSave(title_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -340,13 +340,11 @@ const std::string GameListItem::GetWiiFSPath() const
|
||||
|
||||
if (iso->GetVolumeType() != DiscIO::IVolume::GAMECUBE_DISC)
|
||||
{
|
||||
u64 title = 0;
|
||||
|
||||
iso->GetTitleID((u8*)&title);
|
||||
title = Common::swap64(title);
|
||||
u64 title_id = 0;
|
||||
iso->GetTitleID(&title_id);
|
||||
|
||||
const std::string path = StringFromFormat("%s/title/%08x/%08x/data/",
|
||||
File::GetUserPath(D_WIIROOT_IDX).c_str(), (u32)(title>>32), (u32)title);
|
||||
File::GetUserPath(D_WIIROOT_IDX).c_str(), (u32)(title_id >> 32), (u32)title_id);
|
||||
|
||||
if (!File::Exists(path))
|
||||
File::CreateFullPath(path);
|
||||
|
Reference in New Issue
Block a user