mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-07 15:31:18 +12:00
Use std::filesystem::path
This commit is contained in:
parent
c02db9d63f
commit
dd62ed7f51
2 changed files with 5 additions and 4 deletions
|
@ -216,4 +216,4 @@ struct CoreinitFSParsedPath
|
||||||
|
|
||||||
void coreinitFS_parsePath(CoreinitFSParsedPath* parsedPath, const char* path);
|
void coreinitFS_parsePath(CoreinitFSParsedPath* parsedPath, const char* path);
|
||||||
bool coreinitFS_checkNodeName(CoreinitFSParsedPath* parsedPath, sint32 index, const char* name);
|
bool coreinitFS_checkNodeName(CoreinitFSParsedPath* parsedPath, sint32 index, const char* name);
|
||||||
char* coreinitFS_getNodeName(CoreinitFSParsedPath* parsedPath, sint32 index);
|
char* coreinitFS_getNodeName(CoreinitFSParsedPath* parsedPath, sint32 index);
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
#include <zarchive/zarchivereader.h>
|
#include <zarchive/zarchivereader.h>
|
||||||
#include "config/ActiveSettings.h"
|
#include "config/ActiveSettings.h"
|
||||||
|
#include <filesystem>
|
||||||
|
|
||||||
// detect format by reading file header/footer
|
// detect format by reading file header/footer
|
||||||
CafeTitleFileType DetermineCafeSystemFileType(fs::path filePath)
|
CafeTitleFileType DetermineCafeSystemFileType(fs::path filePath)
|
||||||
|
@ -646,9 +647,9 @@ std::string TitleInfo::GetInstallPath() const
|
||||||
TitleId titleId = GetAppTitleId();
|
TitleId titleId = GetAppTitleId();
|
||||||
TitleIdParser tip(titleId);
|
TitleIdParser tip(titleId);
|
||||||
std::string tmp;
|
std::string tmp;
|
||||||
|
std::filesystem::path path = "usr";
|
||||||
if (tip.IsSystemTitle())
|
if (tip.IsSystemTitle())
|
||||||
tmp = fmt::format("sys/title/{:08x}/{:08x}", GetTitleIdHigh(titleId), GetTitleIdLow(titleId));
|
path = "sys";
|
||||||
else
|
tmp = (path / "title" / fmt::format("{:08x}",GetTitleIdHigh(titleId)) / fmt::format("{:08x}", GetTitleIdLow(titleId))).string();
|
||||||
tmp = fmt::format("usr/title/{:08x}/{:08x}", GetTitleIdHigh(titleId), GetTitleIdLow(titleId));
|
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue