|
|
@ -628,6 +628,10 @@ void GMainWindow::OnMenuInstallToNAND() { |
|
|
QString filename = QFileDialog::getOpenFileName(this, tr("Install File"), |
|
|
QString filename = QFileDialog::getOpenFileName(this, tr("Install File"), |
|
|
UISettings::values.roms_path, file_filter); |
|
|
UISettings::values.roms_path, file_filter); |
|
|
|
|
|
|
|
|
|
|
|
if (filename.isEmpty()) { |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const auto qt_raw_copy = [this](FileSys::VirtualFile src, FileSys::VirtualFile dest) { |
|
|
const auto qt_raw_copy = [this](FileSys::VirtualFile src, FileSys::VirtualFile dest) { |
|
|
if (src == nullptr || dest == nullptr) |
|
|
if (src == nullptr || dest == nullptr) |
|
|
return false; |
|
|
return false; |
|
|
@ -679,7 +683,6 @@ void GMainWindow::OnMenuInstallToNAND() { |
|
|
QMessageBox::Yes; |
|
|
QMessageBox::Yes; |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
if (!filename.isEmpty()) { |
|
|
|
|
|
if (filename.endsWith("xci", Qt::CaseInsensitive)) { |
|
|
if (filename.endsWith("xci", Qt::CaseInsensitive)) { |
|
|
const auto xci = std::make_shared<FileSys::XCI>( |
|
|
const auto xci = std::make_shared<FileSys::XCI>( |
|
|
vfs->OpenFile(filename.toStdString(), FileSys::Mode::Read)); |
|
|
vfs->OpenFile(filename.toStdString(), FileSys::Mode::Read)); |
|
|
@ -744,8 +747,7 @@ void GMainWindow::OnMenuInstallToNAND() { |
|
|
nca, static_cast<FileSys::TitleType>(index), false, qt_raw_copy); |
|
|
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) { |
|
|
if (overwrite()) { |
|
|
if (overwrite()) { |
|
|
const auto res2 = Service::FileSystem::GetUserNANDContents()->InstallEntry( |
|
|
const auto res2 = Service::FileSystem::GetUserNANDContents()->InstallEntry( |
|
|
nca, static_cast<FileSys::TitleType>(index), true, qt_raw_copy); |
|
|
nca, static_cast<FileSys::TitleType>(index), true, qt_raw_copy); |
|
|
@ -759,8 +761,6 @@ void GMainWindow::OnMenuInstallToNAND() { |
|
|
failed(); |
|
|
failed(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void GMainWindow::OnMenuSelectGameListRoot() { |
|
|
void GMainWindow::OnMenuSelectGameListRoot() { |
|
|
|