mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-08-21 22:43:24 +02:00
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.
This commit is contained in:
parent
7b81e1e525
commit
70e86248fd
@ -1055,11 +1055,21 @@ void GMainWindow::OnMenuInstallToNAND() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index >= 5)
|
// If index is equal to or past Game, add the jump in TitleType.
|
||||||
index += 0x7B;
|
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) {
|
if (res == FileSys::InstallResult::Success) {
|
||||||
success();
|
success();
|
||||||
} else if (res == FileSys::InstallResult::ErrorAlreadyExists) {
|
} else if (res == FileSys::InstallResult::ErrorAlreadyExists) {
|
||||||
|
Loading…
Reference in New Issue
Block a user