diff options
| -rw-r--r-- | src/yuzu/main.cpp | 27 |
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 | |||
| 1428 | RemoveAddOnContent(program_id, entry_type); | 1428 | RemoveAddOnContent(program_id, entry_type); |
| 1429 | break; | 1429 | break; |
| 1430 | } | 1430 | } |
| 1431 | game_list->PopulateAsync(UISettings::values.game_dirs); | ||
| 1432 | FileUtil::DeleteDirRecursively(FileUtil::GetUserPath(FileUtil::UserPath::CacheDir) + DIR_SEP + | 1431 | FileUtil::DeleteDirRecursively(FileUtil::GetUserPath(FileUtil::UserPath::CacheDir) + DIR_SEP + |
| 1433 | "game_list"); | 1432 | "game_list"); |
| 1433 | game_list->PopulateAsync(UISettings::values.game_dirs); | ||
| 1434 | } | 1434 | } |
| 1435 | 1435 | ||
| 1436 | void GMainWindow::RemoveBaseContent(u64 program_id, const QString& entry_type) { | 1436 | void GMainWindow::RemoveBaseContent(u64 program_id, const QString& entry_type) { |
| 1437 | const auto res = Core::System::GetInstance() | 1437 | const auto& fs_controller = Core::System::GetInstance().GetFileSystemController(); |
| 1438 | .GetFileSystemController() | 1438 | const auto res = fs_controller.GetUserNANDContents()->RemoveExistingEntry(program_id) || |
| 1439 | .GetUserNANDContents() | 1439 | fs_controller.GetSDMCContents()->RemoveExistingEntry(program_id); |
| 1440 | ->RemoveExistingEntry(program_id); | ||
| 1441 | 1440 | ||
| 1442 | if (res) { | 1441 | if (res) { |
| 1443 | QMessageBox::information(this, tr("Successfully Removed"), | 1442 | QMessageBox::information(this, tr("Successfully Removed"), |
| @@ -1450,10 +1449,10 @@ void GMainWindow::RemoveBaseContent(u64 program_id, const QString& entry_type) { | |||
| 1450 | } | 1449 | } |
| 1451 | 1450 | ||
| 1452 | void GMainWindow::RemoveUpdateContent(u64 program_id, const QString& entry_type) { | 1451 | void GMainWindow::RemoveUpdateContent(u64 program_id, const QString& entry_type) { |
| 1453 | const auto res = Core::System::GetInstance() | 1452 | const auto update_id = program_id | 0x800; |
| 1454 | .GetFileSystemController() | 1453 | const auto& fs_controller = Core::System::GetInstance().GetFileSystemController(); |
| 1455 | .GetUserNANDContents() | 1454 | const auto res = fs_controller.GetUserNANDContents()->RemoveExistingEntry(update_id) || |
| 1456 | ->RemoveExistingEntry(program_id | 0x800); | 1455 | fs_controller.GetSDMCContents()->RemoveExistingEntry(update_id); |
| 1457 | 1456 | ||
| 1458 | if (res) { | 1457 | if (res) { |
| 1459 | QMessageBox::information(this, tr("Successfully Removed"), | 1458 | QMessageBox::information(this, tr("Successfully Removed"), |
| @@ -1466,15 +1465,15 @@ void GMainWindow::RemoveUpdateContent(u64 program_id, const QString& entry_type) | |||
| 1466 | 1465 | ||
| 1467 | void GMainWindow::RemoveAddOnContent(u64 program_id, const QString& entry_type) { | 1466 | void GMainWindow::RemoveAddOnContent(u64 program_id, const QString& entry_type) { |
| 1468 | u32 count{}; | 1467 | u32 count{}; |
| 1468 | const auto& fs_controller = Core::System::GetInstance().GetFileSystemController(); | ||
| 1469 | const auto dlc_entries = Core::System::GetInstance().GetContentProvider().ListEntriesFilter( | 1469 | const auto dlc_entries = Core::System::GetInstance().GetContentProvider().ListEntriesFilter( |
| 1470 | FileSys::TitleType::AOC, FileSys::ContentRecordType::Data); | 1470 | FileSys::TitleType::AOC, FileSys::ContentRecordType::Data); |
| 1471 | 1471 | ||
| 1472 | for (const auto& entry : dlc_entries) { | 1472 | for (const auto& entry : dlc_entries) { |
| 1473 | if ((entry.title_id & DLC_BASE_TITLE_ID_MASK) == program_id) { | 1473 | if ((entry.title_id & DLC_BASE_TITLE_ID_MASK) == program_id) { |
| 1474 | const auto res = Core::System::GetInstance() | 1474 | const auto res = |
| 1475 | .GetFileSystemController() | 1475 | fs_controller.GetUserNANDContents()->RemoveExistingEntry(entry.title_id) || |
| 1476 | .GetUserNANDContents() | 1476 | fs_controller.GetSDMCContents()->RemoveExistingEntry(entry.title_id); |
| 1477 | ->RemoveExistingEntry(entry.title_id); | ||
| 1478 | if (res) { | 1477 | if (res) { |
| 1479 | ++count; | 1478 | ++count; |
| 1480 | } | 1479 | } |
| @@ -1883,9 +1882,9 @@ void GMainWindow::OnMenuInstallToNAND() { | |||
| 1883 | : tr("%n file(s) failed to install\n", "", failed_files.size())); | 1882 | : tr("%n file(s) failed to install\n", "", failed_files.size())); |
| 1884 | 1883 | ||
| 1885 | QMessageBox::information(this, tr("Install Results"), install_results); | 1884 | QMessageBox::information(this, tr("Install Results"), install_results); |
| 1886 | game_list->PopulateAsync(UISettings::values.game_dirs); | ||
| 1887 | FileUtil::DeleteDirRecursively(FileUtil::GetUserPath(FileUtil::UserPath::CacheDir) + DIR_SEP + | 1885 | FileUtil::DeleteDirRecursively(FileUtil::GetUserPath(FileUtil::UserPath::CacheDir) + DIR_SEP + |
| 1888 | "game_list"); | 1886 | "game_list"); |
| 1887 | game_list->PopulateAsync(UISettings::values.game_dirs); | ||
| 1889 | ui.action_Install_File_NAND->setEnabled(true); | 1888 | ui.action_Install_File_NAND->setEnabled(true); |
| 1890 | } | 1889 | } |
| 1891 | 1890 | ||