From 7a26c1dff677d0cb4faa01ac8d1067236183ed3d Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Fri, 15 Oct 2021 23:00:24 +0200 Subject: [PATCH] early-access version 2134 --- README.md | 2 +- src/yuzu/main.cpp | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index dca5a7cbc..24654038b 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 2133. +This is the source code for early-access 2134. ## Legal Notice diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index f016b0f44..84e2c5df7 100755 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2447,15 +2447,13 @@ InstallResult GMainWindow::InstallNCA(const QString& filename) { static_cast(FileSys::TitleType::FirmwarePackageB); } - FileSys::InstallResult res; - if (index >= static_cast(FileSys::TitleType::Application)) { - res = system.GetFileSystemController().GetUserNANDContents()->InstallEntry( - *nca, static_cast(index), true, qt_raw_copy); - } else { - res = system.GetFileSystemController().GetSystemNANDContents()->InstallEntry( - *nca, static_cast(index), true, qt_raw_copy); - } + const bool is_application = index >= static_cast(FileSys::TitleType::Application); + const auto& fs_controller = system.GetFileSystemController(); + auto* registered_cache = is_application ? fs_controller.GetUserNANDContents() + : fs_controller.GetSystemNANDContents(); + const auto res = registered_cache->InstallEntry(*nca, static_cast(index), + true, qt_raw_copy); if (res == FileSys::InstallResult::Success) { return InstallResult::Success; } else if (res == FileSys::InstallResult::OverwriteExisting) {