summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2019-04-23 15:09:02 +0200
committerZach Hilman <zachhilman@gmail.com>2019-05-26 21:12:12 +0200
commit944c07ac7d90b5b146af346845f457d245b32bf2 (patch)
tree8be92bc20ad04d1176535795dce096fd1b7bd780 /src
parentgame_list: Implement caching for game list (diff)
downloadyuzu-944c07ac7d90b5b146af346845f457d245b32bf2.tar
yuzu-944c07ac7d90b5b146af346845f457d245b32bf2.tar.gz
yuzu-944c07ac7d90b5b146af346845f457d245b32bf2.tar.bz2
yuzu-944c07ac7d90b5b146af346845f457d245b32bf2.tar.lz
yuzu-944c07ac7d90b5b146af346845f457d245b32bf2.tar.xz
yuzu-944c07ac7d90b5b146af346845f457d245b32bf2.tar.zst
yuzu-944c07ac7d90b5b146af346845f457d245b32bf2.zip
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/configuration/configure_per_general.cpp10
-rw-r--r--src/yuzu/main.cpp3
2 files changed, 13 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;
}
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index cef2cc1ae..86aed0d94 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1396,6 +1396,9 @@ void GMainWindow::OnMenuInstallToNAND() {
tr("The file was successfully installed."));
game_list->PopulateAsync(UISettings::values.game_directory_path,
UISettings::values.game_directory_deepscan);
+ // Clear the game list cache.
+ FileUtil::DeleteDirRecursively(FileUtil::GetUserPath(FileUtil::UserPath::CacheDir) +
+ DIR_SEP + "game_list");
};
const auto failed = [this]() {