mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-12-19 06:22:17 +00:00
Look for mod loader .ini file in config folder.
This commit is contained in:
parent
a397a90551
commit
d6c2884f2e
1 changed files with 11 additions and 3 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include <cpu/guest_stack_var.h>
|
||||
#include <kernel/function.h>
|
||||
#include <kernel/heap.h>
|
||||
#include <user/paths.h>
|
||||
#include <xxHashMap.h>
|
||||
|
||||
enum class ModType
|
||||
|
|
@ -89,9 +90,16 @@ std::vector<std::filesystem::path>* ModLoader::GetIncludeDirectories(size_t modI
|
|||
|
||||
void ModLoader::Init()
|
||||
{
|
||||
std::filesystem::path userPath = GetUserPath();
|
||||
|
||||
IniFile configIni;
|
||||
if (!configIni.read("cpkredir.ini"))
|
||||
return;
|
||||
if (!configIni.read(userPath / "cpkredir.ini"))
|
||||
{
|
||||
configIni = {};
|
||||
|
||||
if (!configIni.read(GAME_INSTALL_DIRECTORY "/cpkredir.ini"))
|
||||
return;
|
||||
}
|
||||
|
||||
if (!configIni.getBool("CPKREDIR", "Enabled", true))
|
||||
return;
|
||||
|
|
@ -102,7 +110,7 @@ void ModLoader::Init()
|
|||
if (!saveFilePathU8.empty())
|
||||
ModLoader::s_saveFilePath = std::u8string_view((const char8_t*)saveFilePathU8.c_str());
|
||||
else
|
||||
ModLoader::s_saveFilePath = "mlsave/SYS-DATA";
|
||||
ModLoader::s_saveFilePath = userPath / "mlsave/SYS-DATA";
|
||||
}
|
||||
|
||||
std::string modsDbIniFilePathU8 = configIni.getString("CPKREDIR", "ModsDbIni", "");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue