mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-22 10:21:39 +00:00
xam: use std::string for XamContentCreateEx directory
I hate strings
This commit is contained in:
parent
c1495170fe
commit
b728100b5a
1 changed files with 4 additions and 6 deletions
|
|
@ -241,13 +241,11 @@ SWA_API uint32_t XamContentCreateEx(DWORD dwUserIndex, LPCSTR szRootName, const
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
const char* root = "";
|
std::string root = "";
|
||||||
|
|
||||||
if (pContentData->dwContentType == XCONTENTTYPE_SAVEDATA)
|
if (pContentData->dwContentType == XCONTENTTYPE_SAVEDATA)
|
||||||
{
|
{
|
||||||
// auuughh
|
root = Config::GetSavePath().string();
|
||||||
auto savePath = Config::GetSavePath().string();
|
|
||||||
root = new char[savePath.size() + 1];
|
|
||||||
strcpy(const_cast<char*>(root), savePath.c_str());
|
|
||||||
}
|
}
|
||||||
else if (pContentData->dwContentType == XCONTENTTYPE_DLC)
|
else if (pContentData->dwContentType == XCONTENTTYPE_DLC)
|
||||||
{
|
{
|
||||||
|
|
@ -259,7 +257,7 @@ SWA_API uint32_t XamContentCreateEx(DWORD dwUserIndex, LPCSTR szRootName, const
|
||||||
}
|
}
|
||||||
|
|
||||||
XamRegisterContent(*pContentData, root);
|
XamRegisterContent(*pContentData, root);
|
||||||
CreateDirectoryA(root, nullptr);
|
CreateDirectoryA(root.c_str(), nullptr);
|
||||||
XamRootCreate(szRootName, root);
|
XamRootCreate(szRootName, root);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue