summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-09-27 15:19:53 +0200
committerZach Hilman <zachhilman@gmail.com>2018-09-27 15:20:06 +0200
commit70e86248fd6b09590ad66ad534195e3a6a3e934b (patch)
tree21e7bd573c3091a7d700dcc927f6e8f104887dde /src
parentMerge pull request #1365 from DarkLordZach/lfs (diff)
downloadyuzu-70e86248fd6b09590ad66ad534195e3a6a3e934b.tar
yuzu-70e86248fd6b09590ad66ad534195e3a6a3e934b.tar.gz
yuzu-70e86248fd6b09590ad66ad534195e3a6a3e934b.tar.bz2
yuzu-70e86248fd6b09590ad66ad534195e3a6a3e934b.tar.lz
yuzu-70e86248fd6b09590ad66ad534195e3a6a3e934b.tar.xz
yuzu-70e86248fd6b09590ad66ad534195e3a6a3e934b.tar.zst
yuzu-70e86248fd6b09590ad66ad534195e3a6a3e934b.zip
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/main.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index dc8b5407d..cb37796fa 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -1055,11 +1055,21 @@ void GMainWindow::OnMenuInstallToNAND() {
return;
}
- if (index >= 5)
- index += 0x7B;
+ // If index is equal to or past Game, add the jump in TitleType.
+ if (index >= 5) {
+ index += static_cast<size_t>(FileSys::TitleType::Application) -
+ static_cast<size_t>(FileSys::TitleType::FirmwarePackageB);
+ }
+
+ FileSys::InstallResult res;
+ if (index >= static_cast<size_t>(FileSys::TitleType::Application)) {
+ res = Service::FileSystem::GetUserNANDContents()->InstallEntry(
+ nca, static_cast<FileSys::TitleType>(index), false, qt_raw_copy);
+ } else {
+ res = Service::FileSystem::GetSystemNANDContents()->InstallEntry(
+ nca, static_cast<FileSys::TitleType>(index), false, qt_raw_copy);
+ }
- const auto res = Service::FileSystem::GetUserNANDContents()->InstallEntry(
- nca, static_cast<FileSys::TitleType>(index), false, qt_raw_copy);
if (res == FileSys::InstallResult::Success) {
success();
} else if (res == FileSys::InstallResult::ErrorAlreadyExists) {