diff --git a/UnleashedRecomp/app.cpp b/UnleashedRecomp/app.cpp index 2b9c219c..60a7f29b 100644 --- a/UnleashedRecomp/app.cpp +++ b/UnleashedRecomp/app.cpp @@ -35,6 +35,7 @@ PPC_FUNC(sub_824EB490) App::s_isInit = true; App::s_isMissingDLC = !Installer::checkAllDLC(GetGamePath()); App::s_language = Config::Language; + Registry::Save(); __imp__sub_824EB490(ctx, base); } diff --git a/UnleashedRecomp/main.cpp b/UnleashedRecomp/main.cpp index a050bf79..6c14d338 100644 --- a/UnleashedRecomp/main.cpp +++ b/UnleashedRecomp/main.cpp @@ -152,14 +152,6 @@ int main(int argc, char *argv[]) os::logger::Init(); - Registry::Load(); - - if (!Registry::RootDirectoryPath.empty()) - { - if (!os::process::SetWorkingDirectory(std::filesystem::path(Registry::RootDirectoryPath))) - LOGFN_ERROR("Failed to set working directory from registry"); - } - bool forceInstaller = false; bool forceDLCInstaller = false; const char *sdlVideoDriver = nullptr; diff --git a/UnleashedRecomp/user/paths.h b/UnleashedRecomp/user/paths.h index 951a637a..d914213b 100644 --- a/UnleashedRecomp/user/paths.h +++ b/UnleashedRecomp/user/paths.h @@ -22,7 +22,7 @@ inline std::filesystem::path GetSavePath(bool checkForMods) if (checkForMods && !ModLoader::s_saveFilePath.empty()) return ModLoader::s_saveFilePath.parent_path(); else - return BuildUserPath() / "save"; + return GetUserPath() / "save"; } // Returned file name may not necessarily be diff --git a/UnleashedRecomp/user/registry.cpp b/UnleashedRecomp/user/registry.cpp index a0263d3d..fa6b5a84 100644 --- a/UnleashedRecomp/user/registry.cpp +++ b/UnleashedRecomp/user/registry.cpp @@ -5,7 +5,7 @@ void Registry::Load() { - os::registry::ReadValue(STR(RootDirectoryPath), RootDirectoryPath); + } void Registry::Save() diff --git a/UnleashedRecomp/user/registry.h b/UnleashedRecomp/user/registry.h index 867d6f0b..10867f50 100644 --- a/UnleashedRecomp/user/registry.h +++ b/UnleashedRecomp/user/registry.h @@ -3,8 +3,6 @@ class Registry { public: - inline static std::filesystem::path RootDirectoryPath; - static void Load(); static void Save(); };