Skip to content

Commit 3604404

Browse files
authored
config: Fix loading install directories. (#1626)
1 parent 99ac10a commit 3604404

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/common/config.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,12 @@ void load(const std::filesystem::path& path) {
578578
m_window_size_W = toml::find_or<int>(gui, "mw_width", 0);
579579
m_window_size_H = toml::find_or<int>(gui, "mw_height", 0);
580580

581+
const auto install_dir_array =
582+
toml::find_or<std::vector<std::string>>(gui, "installDirs", {});
583+
for (const auto& dir : install_dir_array) {
584+
addGameInstallDir(std::filesystem::path{dir});
585+
}
586+
581587
settings_addon_install_dir = toml::find_fs_path_or(gui, "addonInstallDir", {});
582588
main_window_geometry_x = toml::find_or<int>(gui, "geometry_x", 0);
583589
main_window_geometry_y = toml::find_or<int>(gui, "geometry_y", 0);

0 commit comments

Comments
 (0)