diff options
author | bunnei <bunneidev@gmail.com> | 2019-05-30 13:04:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-30 13:04:40 -0400 |
commit | 75561d190a67005b5c970747d59942174cc0d572 (patch) | |
tree | 4a28108dc7c09d3ff95d6f2966e3da4e98059014 /src/yuzu/configuration/configure_per_general.cpp | |
parent | e3608578e40065779965af483db69941ef0e29e1 (diff) | |
parent | 9b2d38582f1b7ad1d3c8dbc73a379cfca4fdabb2 (diff) |
Merge pull request #2431 from DarkLordZach/game-list-cache
yuzu: Implement a caching mechanism for the game list
Diffstat (limited to 'src/yuzu/configuration/configure_per_general.cpp')
-rw-r--r-- | src/yuzu/configuration/configure_per_general.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/yuzu/configuration/configure_per_general.cpp b/src/yuzu/configuration/configure_per_general.cpp index 2bdfc8e5a..c3e68fdf5 100644 --- a/src/yuzu/configuration/configure_per_general.cpp +++ b/src/yuzu/configuration/configure_per_general.cpp @@ -13,6 +13,8 @@ #include <QTimer> #include <QTreeView> +#include "common/common_paths.h" +#include "common/file_util.h" #include "core/file_sys/control_metadata.h" #include "core/file_sys/patch_manager.h" #include "core/file_sys/xts_archive.h" @@ -79,6 +81,14 @@ void ConfigurePerGameGeneral::applyConfiguration() { disabled_addons.push_back(item.front()->text().toStdString()); } + auto current = Settings::values.disabled_addons[title_id]; + std::sort(disabled_addons.begin(), disabled_addons.end()); + std::sort(current.begin(), current.end()); + if (disabled_addons != current) { + FileUtil::Delete(FileUtil::GetUserPath(FileUtil::UserPath::CacheDir) + DIR_SEP + + "game_list" + DIR_SEP + fmt::format("{:016X}.pv.txt", title_id)); + } + Settings::values.disabled_addons[title_id] = disabled_addons; } |