user-manager: replacing fmt::format with string concat.

(cherry picked from commit 63379afc7a402edb2159912318281febc3e7438a)
This commit is contained in:
mpm11011 2018-06-13 18:11:51 -04:00 committed by Ivan
parent 948bd3673e
commit 68202eb2b7
7 changed files with 20 additions and 20 deletions

View file

@ -296,7 +296,7 @@ error_code sceNpTrophyRegisterContext(ppu_thread& ppu, u32 context, u32 handle,
}
}
std::string trophyPath = fmt::format("/dev_hdd0/home/%s/trophy/%s", Emu.GetUsr(), ctxt->trp_name);
std::string trophyPath = "/dev_hdd0/home/" + Emu.GetUsr() + "/trophy/" + ctxt->trp_name;
if (!trp.Install(trophyPath))
{
return SCE_NP_TROPHY_ERROR_ILLEGAL_UPDATE;
@ -345,7 +345,7 @@ error_code sceNpTrophyGetRequiredDiskSpace(u32 context, u32 handle, vm::ptr<u64>
return SCE_NP_TROPHY_ERROR_UNKNOWN_HANDLE;
}
if (!fs::is_dir(vfs::get(fmt::format("/dev_hdd0/home/%s/trophy/%s", Emu.GetUsr(), ctxt->trp_name))))
if (!fs::is_dir(vfs::get("/dev_hdd0/home/" + Emu.GetUsr() + "/trophy/" + ctxt->trp_name)))
{
TRPLoader trp(ctxt->trp_stream);
@ -404,7 +404,7 @@ error_code sceNpTrophyGetGameInfo(u32 context, u32 handle, vm::ptr<SceNpTrophyGa
return SCE_NP_TROPHY_ERROR_UNKNOWN_HANDLE;
}
fs::file config(vfs::get(fmt::format("/dev_hdd0/home/%s/trophy/%s/TROPCONF.SFM", Emu.GetUsr(), ctxt->trp_name)));
fs::file config(vfs::get("/dev_hdd0/home/" + Emu.GetUsr() + "/trophy/" + ctxt->trp_name + "/TROPCONF.SFM"));
if (!config)
{
@ -503,7 +503,7 @@ error_code sceNpTrophyUnlockTrophy(u32 context, u32 handle, s32 trophyId, vm::pt
return SCE_NP_TROPHY_ERROR_ALREADY_UNLOCKED;
ctxt->tropusr->UnlockTrophy(trophyId, 0, 0); // TODO
std::string trophyPath = fmt::format("/dev_hdd0/home/%s/trophy/%s/TROPUSR.DAT", Emu.GetUsr(), ctxt->trp_name);
std::string trophyPath = "/dev_hdd0/home/" + Emu.GetUsr() + "/trophy/" + ctxt->trp_name + "/TROPUSR.DAT";
ctxt->tropusr->Save(trophyPath);
if (platinumId)
@ -526,7 +526,7 @@ error_code sceNpTrophyUnlockTrophy(u32 context, u32 handle, s32 trophyId, vm::pt
// Get icon for the notification.
std::string paddedTrophyId = padding + std::to_string(trophyId);
std::string trophyIconPath = fmt::format("/dev_hdd0/home/%s/trophy/%s/TROP%s.PNG", Emu.GetUsr(), ctxt->trp_name, paddedTrophyId);
std::string trophyIconPath = "/dev_hdd0/home/" + Emu.GetUsr() + "/trophy/" + ctxt->trp_name + "/TROP" + paddedTrophyId + ".PNG";
fs::file trophyIconFile = fs::file(vfs::get(trophyIconPath));
size_t iconSize = trophyIconFile.size();
std::vector<uchar> trophyIconData;
@ -611,7 +611,7 @@ error_code sceNpTrophyGetTrophyInfo(u32 context, u32 handle, s32 trophyId, vm::p
return SCE_NP_TROPHY_ERROR_UNKNOWN_HANDLE;
}
fs::file config(vfs::get(fmt::format("/dev_hdd0/home/%s/trophy/%s/TROPCONF.SFM", Emu.GetUsr(), ctxt->trp_name)));
fs::file config(vfs::get("/dev_hdd0/home/" + Emu.GetUsr() + "/trophy/" + ctxt->trp_name + "/TROPCONF.SFM"));
if (!config)
{
@ -754,7 +754,7 @@ error_code sceNpTrophyGetGameIcon(u32 context, u32 handle, vm::ptr<void> buffer,
return SCE_NP_TROPHY_ERROR_UNKNOWN_HANDLE;
}
fs::file icon_file(vfs::get(fmt::format("/dev_hdd0/home/%s/trophy/%s/ICON0.PNG", Emu.GetUsr(), ctxt->trp_name)));
fs::file icon_file(vfs::get("/dev_hdd0/home/" + Emu.GetUsr() + "/trophy/" + ctxt->trp_name + "/ICON0.PNG"));
if (!icon_file)
{
@ -807,7 +807,7 @@ error_code sceNpTrophyGetTrophyIcon(u32 context, u32 handle, s32 trophyId, vm::p
return hidden ? SCE_NP_TROPHY_ERROR_HIDDEN : SCE_NP_TROPHY_ERROR_LOCKED;
}
fs::file icon_file(vfs::get(fmt::format("/dev_hdd0/home/%s/trophy/%s/TROP%03d.PNG", Emu.GetUsr(), ctxt->trp_name, trophyId)));
fs::file icon_file(vfs::get("/dev_hdd0/home/" + Emu.GetUsr() + "/trophy/" + ctxt->trp_name + fmt::format("/TROP%03d.PNG", trophyId)));
if (!icon_file)
{