use addGameInstallDir here

This commit is contained in:
ElBread3 2024-10-12 07:43:56 -05:00
parent b412cb4cca
commit 877149859b

View File

@ -538,12 +538,12 @@ void load(const std::filesystem::path& path) {
// TODO Migration code, after a major release this should be removed. // TODO Migration code, after a major release this should be removed.
auto old_game_install_dir = toml::find_fs_path_or(gui, "installDir", {}); auto old_game_install_dir = toml::find_fs_path_or(gui, "installDir", {});
if (!old_game_install_dir.empty()) { if (!old_game_install_dir.empty()) {
settings_install_dirs.emplace_back(std::filesystem::path{old_game_install_dir}); addGameInstallDir(std::filesystem::path{old_game_install_dir});
} else { } else {
const auto install_dir_array = const auto install_dir_array =
toml::find_or<std::vector<std::string>>(gui, "installDirs", {}); toml::find_or<std::vector<std::string>>(gui, "installDirs", {});
for (const auto& dir : install_dir_array) { for (const auto& dir : install_dir_array) {
settings_install_dirs.emplace_back(std::filesystem::path{dir}); addGameInstallDir(std::filesystem::path{dir});
} }
} }