DolphinQt: Add way to override "ResourcePack" folder that controls the location of resource packs

This commit is contained in:
iwubcode
2019-10-06 01:21:06 -05:00
parent 876a1ccc3e
commit 490fd0c3b3
7 changed files with 42 additions and 6 deletions

View File

@ -69,11 +69,18 @@ static void CreateLoadPath(const std::string& path)
File::CreateFullPath(File::GetUserPath(D_HIRESTEXTURES_IDX));
}
static void CreateResourcePackPath(const std::string& path)
{
if (!path.empty())
File::SetUserPath(D_RESOURCEPACK_IDX, path + '/');
}
static void InitCustomPaths()
{
File::SetUserPath(D_WIIROOT_IDX, Config::Get(Config::MAIN_FS_PATH));
CreateLoadPath(Config::Get(Config::MAIN_LOAD_PATH));
CreateDumpPath(Config::Get(Config::MAIN_DUMP_PATH));
CreateResourcePackPath(Config::Get(Config::MAIN_RESOURCEPACK_PATH));
const std::string sd_path = Config::Get(Config::MAIN_SD_PATH);
if (!sd_path.empty())
File::SetUserPath(F_WIISDCARD_IDX, sd_path);