diff options
| author | 2018-09-27 09:19:53 -0400 | |
|---|---|---|
| committer | 2018-09-27 09:20:06 -0400 | |
| commit | 70e86248fd6b09590ad66ad534195e3a6a3e934b (patch) | |
| tree | 21e7bd573c3091a7d700dcc927f6e8f104887dde /src | |
| parent | Merge pull request #1365 from DarkLordZach/lfs (diff) | |
| download | yuzu-70e86248fd6b09590ad66ad534195e3a6a3e934b.tar.gz yuzu-70e86248fd6b09590ad66ad534195e3a6a3e934b.tar.xz yuzu-70e86248fd6b09590ad66ad534195e3a6a3e934b.zip | |
qt: Install System TitleTypes to System NAND
Fixes an issue where installed system archive NCAs would be installed to user NAND and not recognized by games.
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/main.cpp | 18 |
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() { | |||
| 1055 | return; | 1055 | return; |
| 1056 | } | 1056 | } |
| 1057 | 1057 | ||
| 1058 | if (index >= 5) | 1058 | // If index is equal to or past Game, add the jump in TitleType. |
| 1059 | index += 0x7B; | 1059 | if (index >= 5) { |
| 1060 | index += static_cast<size_t>(FileSys::TitleType::Application) - | ||
| 1061 | static_cast<size_t>(FileSys::TitleType::FirmwarePackageB); | ||
| 1062 | } | ||
| 1063 | |||
| 1064 | FileSys::InstallResult res; | ||
| 1065 | if (index >= static_cast<size_t>(FileSys::TitleType::Application)) { | ||
| 1066 | res = Service::FileSystem::GetUserNANDContents()->InstallEntry( | ||
| 1067 | nca, static_cast<FileSys::TitleType>(index), false, qt_raw_copy); | ||
| 1068 | } else { | ||
| 1069 | res = Service::FileSystem::GetSystemNANDContents()->InstallEntry( | ||
| 1070 | nca, static_cast<FileSys::TitleType>(index), false, qt_raw_copy); | ||
| 1071 | } | ||
| 1060 | 1072 | ||
| 1061 | const auto res = Service::FileSystem::GetUserNANDContents()->InstallEntry( | ||
| 1062 | nca, static_cast<FileSys::TitleType>(index), false, qt_raw_copy); | ||
| 1063 | if (res == FileSys::InstallResult::Success) { | 1073 | if (res == FileSys::InstallResult::Success) { |
| 1064 | success(); | 1074 | success(); |
| 1065 | } else if (res == FileSys::InstallResult::ErrorAlreadyExists) { | 1075 | } else if (res == FileSys::InstallResult::ErrorAlreadyExists) { |