mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-07 08:39:00 +00: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:
parent
2261224980
commit
36b9e3dd35
10 changed files with 31 additions and 29 deletions
|
@ -23,6 +23,7 @@
|
|||
#include "Common/FileUtil.h"
|
||||
#include "Common/Hash.h"
|
||||
#include "Common/IniFile.h"
|
||||
#include "Common/NandPaths.h"
|
||||
#include "Common/StringUtil.h"
|
||||
|
||||
#include "Core/Boot/Boot.h"
|
||||
|
@ -371,9 +372,7 @@ const std::string GameListItem::GetWiiFSPath() const
|
|||
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_id >> 32), (u32)title_id);
|
||||
const std::string path = Common::GetTitleDataPath(title_id, Common::FROM_CONFIGURED_ROOT);
|
||||
|
||||
if (!File::Exists(path))
|
||||
File::CreateFullPath(path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue