From 36044043bcf4600fcda33eb80efde4c4ec5a514d Mon Sep 17 00:00:00 2001 From: squidbus <175574877+squidbus@users.noreply.github.com> Date: Sat, 30 Nov 2024 02:08:34 -0800 Subject: [PATCH] config: Fix loading install directories. (#1626) --- src/common/config.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/common/config.cpp b/src/common/config.cpp index 5c857afb4c..c01583990f 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -578,6 +578,12 @@ void load(const std::filesystem::path& path) { m_window_size_W = toml::find_or(gui, "mw_width", 0); m_window_size_H = toml::find_or(gui, "mw_height", 0); + const auto install_dir_array = + toml::find_or>(gui, "installDirs", {}); + for (const auto& dir : install_dir_array) { + addGameInstallDir(std::filesystem::path{dir}); + } + settings_addon_install_dir = toml::find_fs_path_or(gui, "addonInstallDir", {}); main_window_geometry_x = toml::find_or(gui, "geometry_x", 0); main_window_geometry_y = toml::find_or(gui, "geometry_y", 0);