mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Don't duplicate code for getting paths based on title IDs
I've seen the expression (u32)(title_id >> 32), (u32)title_id a few more times in my life than I would've liked to...
This commit is contained in:
@ -92,14 +92,12 @@ void ShutdownWiiRoot()
|
||||
{
|
||||
if (!s_temp_wii_root.empty())
|
||||
{
|
||||
std::string save_path =
|
||||
Common::GetTitleDataPath(SConfig::GetInstance().GetTitleID(), Common::FROM_SESSION_ROOT);
|
||||
std::string user_save_path =
|
||||
Common::GetTitleDataPath(SConfig::GetInstance().GetTitleID(), Common::FROM_CONFIGURED_ROOT);
|
||||
std::string user_backup_path =
|
||||
File::GetUserPath(D_BACKUP_IDX) +
|
||||
StringFromFormat("%08x/%08x/", static_cast<u32>(SConfig::GetInstance().GetTitleID() >> 32),
|
||||
static_cast<u32>(SConfig::GetInstance().GetTitleID()));
|
||||
const u64 title_id = SConfig::GetInstance().GetTitleID();
|
||||
std::string save_path = Common::GetTitleDataPath(title_id, Common::FROM_SESSION_ROOT);
|
||||
std::string user_save_path = Common::GetTitleDataPath(title_id, Common::FROM_CONFIGURED_ROOT);
|
||||
std::string user_backup_path = File::GetUserPath(D_BACKUP_IDX) +
|
||||
StringFromFormat("%08x/%08x/", static_cast<u32>(title_id >> 32),
|
||||
static_cast<u32>(title_id));
|
||||
if (File::Exists(save_path + "banner.bin") && SConfig::GetInstance().bEnableMemcardSdWriting)
|
||||
{
|
||||
// Backup the existing save just in case it's still needed.
|
||||
|
Reference in New Issue
Block a user