summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2020-07-20 16:30:56 +0200
committerMorph <39850852+Morph1984@users.noreply.github.com>2020-07-29 12:50:30 +0200
commite59d17167d72a96068b7fd929e11a1cf26ecb809 (patch)
tree9c7701b031434318ed66114c711a08576a26b4b4 /src
parentxts_archive: Check if the file is nullptr prior to parsing (diff)
downloadyuzu-e59d17167d72a96068b7fd929e11a1cf26ecb809.tar
yuzu-e59d17167d72a96068b7fd929e11a1cf26ecb809.tar.gz
yuzu-e59d17167d72a96068b7fd929e11a1cf26ecb809.tar.bz2
yuzu-e59d17167d72a96068b7fd929e11a1cf26ecb809.tar.lz
yuzu-e59d17167d72a96068b7fd929e11a1cf26ecb809.tar.xz
yuzu-e59d17167d72a96068b7fd929e11a1cf26ecb809.tar.zst
yuzu-e59d17167d72a96068b7fd929e11a1cf26ecb809.zip
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/main.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 08aac9f45..276658c9e 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1428,16 +1428,15 @@ void GMainWindow::OnGameListRemoveInstalledEntry(u64 program_id, InstalledEntryT
RemoveAddOnContent(program_id, entry_type);
break;
}
- game_list->PopulateAsync(UISettings::values.game_dirs);
FileUtil::DeleteDirRecursively(FileUtil::GetUserPath(FileUtil::UserPath::CacheDir) + DIR_SEP +
"game_list");
+ game_list->PopulateAsync(UISettings::values.game_dirs);
}
void GMainWindow::RemoveBaseContent(u64 program_id, const QString& entry_type) {
- const auto res = Core::System::GetInstance()
- .GetFileSystemController()
- .GetUserNANDContents()
- ->RemoveExistingEntry(program_id);
+ const auto& fs_controller = Core::System::GetInstance().GetFileSystemController();
+ const auto res = fs_controller.GetUserNANDContents()->RemoveExistingEntry(program_id) ||
+ fs_controller.GetSDMCContents()->RemoveExistingEntry(program_id);
if (res) {
QMessageBox::information(this, tr("Successfully Removed"),
@@ -1450,10 +1449,10 @@ void GMainWindow::RemoveBaseContent(u64 program_id, const QString& entry_type) {
}
void GMainWindow::RemoveUpdateContent(u64 program_id, const QString& entry_type) {
- const auto res = Core::System::GetInstance()
- .GetFileSystemController()
- .GetUserNANDContents()
- ->RemoveExistingEntry(program_id | 0x800);
+ const auto update_id = program_id | 0x800;
+ const auto& fs_controller = Core::System::GetInstance().GetFileSystemController();
+ const auto res = fs_controller.GetUserNANDContents()->RemoveExistingEntry(update_id) ||
+ fs_controller.GetSDMCContents()->RemoveExistingEntry(update_id);
if (res) {
QMessageBox::information(this, tr("Successfully Removed"),
@@ -1466,15 +1465,15 @@ void GMainWindow::RemoveUpdateContent(u64 program_id, const QString& entry_type)
void GMainWindow::RemoveAddOnContent(u64 program_id, const QString& entry_type) {
u32 count{};
+ const auto& fs_controller = Core::System::GetInstance().GetFileSystemController();
const auto dlc_entries = Core::System::GetInstance().GetContentProvider().ListEntriesFilter(
FileSys::TitleType::AOC, FileSys::ContentRecordType::Data);
for (const auto& entry : dlc_entries) {
if ((entry.title_id & DLC_BASE_TITLE_ID_MASK) == program_id) {
- const auto res = Core::System::GetInstance()
- .GetFileSystemController()
- .GetUserNANDContents()
- ->RemoveExistingEntry(entry.title_id);
+ const auto res =
+ fs_controller.GetUserNANDContents()->RemoveExistingEntry(entry.title_id) ||
+ fs_controller.GetSDMCContents()->RemoveExistingEntry(entry.title_id);
if (res) {
++count;
}
@@ -1883,9 +1882,9 @@ void GMainWindow::OnMenuInstallToNAND() {
: tr("%n file(s) failed to install\n", "", failed_files.size()));
QMessageBox::information(this, tr("Install Results"), install_results);
- game_list->PopulateAsync(UISettings::values.game_dirs);
FileUtil::DeleteDirRecursively(FileUtil::GetUserPath(FileUtil::UserPath::CacheDir) + DIR_SEP +
"game_list");
+ game_list->PopulateAsync(UISettings::values.game_dirs);
ui.action_Install_File_NAND->setEnabled(true);
}