diff --git a/UnleashedRecomp/config.h b/UnleashedRecomp/config.h index 9605223..7bc0c68 100644 --- a/UnleashedRecomp/config.h +++ b/UnleashedRecomp/config.h @@ -72,6 +72,11 @@ public: return GetUserPath() / TOML_FILE; } + static std::filesystem::path GetSavePath() + { + return GetUserPath() / "save"; + } + static void Load(); static void Save(); }; diff --git a/UnleashedRecomp/kernel/xam.cpp b/UnleashedRecomp/kernel/xam.cpp index b3e6476..538d52f 100644 --- a/UnleashedRecomp/kernel/xam.cpp +++ b/UnleashedRecomp/kernel/xam.cpp @@ -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(root), savePath.c_str()); } else if (pContentData->dwContentType == XCONTENTTYPE_DLC) { diff --git a/UnleashedRecomp/main.cpp b/UnleashedRecomp/main.cpp index 26bf5a3..eef5a1b 100644 --- a/UnleashedRecomp/main.cpp +++ b/UnleashedRecomp/main.cpp @@ -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?