mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-12-22 07:52:18 +00:00
Fix new saves being written to game root
This commit is contained in:
parent
78cba0e78d
commit
08a15e3b33
3 changed files with 10 additions and 2 deletions
|
|
@ -72,6 +72,11 @@ public:
|
|||
return GetUserPath() / TOML_FILE;
|
||||
}
|
||||
|
||||
static std::filesystem::path GetSavePath()
|
||||
{
|
||||
return GetUserPath() / "save";
|
||||
}
|
||||
|
||||
static void Load();
|
||||
static void Save();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -244,7 +244,10 @@ SWA_API uint32_t XamContentCreateEx(DWORD dwUserIndex, LPCSTR szRootName, const
|
|||
const char* root = "";
|
||||
if (pContentData->dwContentType == XCONTENTTYPE_SAVEDATA)
|
||||
{
|
||||
root = ".\\save";
|
||||
// auuughh
|
||||
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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ void KiSystemStartup()
|
|||
XamRegisterContent(gameContent, DirectoryExists(".\\game") ? ".\\game" : ".");
|
||||
XamRegisterContent(updateContent, ".\\update");
|
||||
|
||||
const auto savePath = Config::GetUserPath() / "save";
|
||||
const auto savePath = Config::GetSavePath();
|
||||
const auto saveName = "SYS-DATA";
|
||||
|
||||
// TODO: implement save slots?
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue