mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -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:
@ -258,7 +258,7 @@ void CNANDContentManager::ClearCache()
|
||||
void CNANDContentLoader::RemoveTitle() const
|
||||
{
|
||||
const u64 title_id = m_tmd.GetTitleId();
|
||||
INFO_LOG(DISCIO, "RemoveTitle %08x/%08x", (u32)(title_id >> 32), (u32)title_id);
|
||||
INFO_LOG(DISCIO, "RemoveTitle %016" PRIx64, title_id);
|
||||
if (IsValid())
|
||||
{
|
||||
// remove TMD?
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "Common/ColorUtil.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/NandPaths.h"
|
||||
#include "Common/StringUtil.h"
|
||||
#include "Common/Swap.h"
|
||||
|
||||
@ -30,9 +31,8 @@ std::vector<u32> IVolume::GetWiiBanner(int* width, int* height, u64 title_id)
|
||||
*width = 0;
|
||||
*height = 0;
|
||||
|
||||
std::string file_name = StringFromFormat("%s/title/%08x/%08x/data/banner.bin",
|
||||
File::GetUserPath(D_WIIROOT_IDX).c_str(),
|
||||
(u32)(title_id >> 32), (u32)title_id);
|
||||
const std::string file_name =
|
||||
Common::GetTitleDataPath(title_id, Common::FROM_CONFIGURED_ROOT) + "banner.bin";
|
||||
if (!File::Exists(file_name))
|
||||
return std::vector<u32>();
|
||||
|
||||
|
Reference in New Issue
Block a user