mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-27 12:51:42 +00:00
Remove RootDirectoryPath and save registry at startup
This commit is contained in:
parent
b4ed5fc9bf
commit
d15a6655eb
5 changed files with 3 additions and 12 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
void Registry::Load()
|
||||
{
|
||||
os::registry::ReadValue(STR(RootDirectoryPath), RootDirectoryPath);
|
||||
|
||||
}
|
||||
|
||||
void Registry::Save()
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
class Registry
|
||||
{
|
||||
public:
|
||||
inline static std::filesystem::path RootDirectoryPath;
|
||||
|
||||
static void Load();
|
||||
static void Save();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue