mirror of
https://github.com/yuzu-mirror/yuzu
synced 2024-12-24 21:03:05 +00:00
yuzu: Clear partial/full game list cache when data is updated
This commit is contained in:
parent
f95bdb5088
commit
944c07ac7d
2 changed files with 13 additions and 0 deletions
|
@ -13,6 +13,8 @@
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QTreeView>
|
#include <QTreeView>
|
||||||
|
|
||||||
|
#include "common/common_paths.h"
|
||||||
|
#include "common/file_util.h"
|
||||||
#include "core/file_sys/control_metadata.h"
|
#include "core/file_sys/control_metadata.h"
|
||||||
#include "core/file_sys/patch_manager.h"
|
#include "core/file_sys/patch_manager.h"
|
||||||
#include "core/file_sys/xts_archive.h"
|
#include "core/file_sys/xts_archive.h"
|
||||||
|
@ -79,6 +81,14 @@ void ConfigurePerGameGeneral::applyConfiguration() {
|
||||||
disabled_addons.push_back(item.front()->text().toStdString());
|
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;
|
Settings::values.disabled_addons[title_id] = disabled_addons;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1396,6 +1396,9 @@ void GMainWindow::OnMenuInstallToNAND() {
|
||||||
tr("The file was successfully installed."));
|
tr("The file was successfully installed."));
|
||||||
game_list->PopulateAsync(UISettings::values.game_directory_path,
|
game_list->PopulateAsync(UISettings::values.game_directory_path,
|
||||||
UISettings::values.game_directory_deepscan);
|
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]() {
|
const auto failed = [this]() {
|
||||||
|
|
Loading…
Reference in a new issue