mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-15 07:50:06 +00:00
Merge pull request #11604 from t895/only-install-nsp
Frontend: Remove ability to install xci files
This commit is contained in:
commit
4487c165c8
@ -141,10 +141,6 @@ public:
|
|||||||
if (nsp->IsExtractedType()) {
|
if (nsp->IsExtractedType()) {
|
||||||
return InstallError;
|
return InstallError;
|
||||||
}
|
}
|
||||||
} else if (file_extension == "xci") {
|
|
||||||
jconst xci =
|
|
||||||
std::make_shared<FileSys::XCI>(m_vfs->OpenFile(filename, FileSys::Mode::Read));
|
|
||||||
nsp = xci->GetSecurePartitionNSP();
|
|
||||||
} else {
|
} else {
|
||||||
return ErrorFilenameExtension;
|
return ErrorFilenameExtension;
|
||||||
}
|
}
|
||||||
|
@ -3113,10 +3113,9 @@ void GMainWindow::OnMenuInstallToNAND() {
|
|||||||
QFuture<InstallResult> future;
|
QFuture<InstallResult> future;
|
||||||
InstallResult result;
|
InstallResult result;
|
||||||
|
|
||||||
if (file.endsWith(QStringLiteral("xci"), Qt::CaseInsensitive) ||
|
if (file.endsWith(QStringLiteral("nsp"), Qt::CaseInsensitive)) {
|
||||||
file.endsWith(QStringLiteral("nsp"), Qt::CaseInsensitive)) {
|
|
||||||
|
|
||||||
future = QtConcurrent::run([this, &file] { return InstallNSPXCI(file); });
|
future = QtConcurrent::run([this, &file] { return InstallNSP(file); });
|
||||||
|
|
||||||
while (!future.isFinished()) {
|
while (!future.isFinished()) {
|
||||||
QCoreApplication::processEvents();
|
QCoreApplication::processEvents();
|
||||||
@ -3175,7 +3174,7 @@ void GMainWindow::OnMenuInstallToNAND() {
|
|||||||
ui->action_Install_File_NAND->setEnabled(true);
|
ui->action_Install_File_NAND->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
InstallResult GMainWindow::InstallNSPXCI(const QString& filename) {
|
InstallResult GMainWindow::InstallNSP(const QString& filename) {
|
||||||
const auto qt_raw_copy = [this](const FileSys::VirtualFile& src,
|
const auto qt_raw_copy = [this](const FileSys::VirtualFile& src,
|
||||||
const FileSys::VirtualFile& dest, std::size_t block_size) {
|
const FileSys::VirtualFile& dest, std::size_t block_size) {
|
||||||
if (src == nullptr || dest == nullptr) {
|
if (src == nullptr || dest == nullptr) {
|
||||||
@ -3209,9 +3208,7 @@ InstallResult GMainWindow::InstallNSPXCI(const QString& filename) {
|
|||||||
return InstallResult::Failure;
|
return InstallResult::Failure;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const auto xci = std::make_shared<FileSys::XCI>(
|
return InstallResult::Failure;
|
||||||
vfs->OpenFile(filename.toStdString(), FileSys::Mode::Read));
|
|
||||||
nsp = xci->GetSecurePartitionNSP();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nsp->GetStatus() != Loader::ResultStatus::Success) {
|
if (nsp->GetStatus() != Loader::ResultStatus::Success) {
|
||||||
|
@ -387,7 +387,7 @@ private:
|
|||||||
void RemoveCacheStorage(u64 program_id);
|
void RemoveCacheStorage(u64 program_id);
|
||||||
bool SelectRomFSDumpTarget(const FileSys::ContentProvider&, u64 program_id,
|
bool SelectRomFSDumpTarget(const FileSys::ContentProvider&, u64 program_id,
|
||||||
u64* selected_title_id, u8* selected_content_record_type);
|
u64* selected_title_id, u8* selected_content_record_type);
|
||||||
InstallResult InstallNSPXCI(const QString& filename);
|
InstallResult InstallNSP(const QString& filename);
|
||||||
InstallResult InstallNCA(const QString& filename);
|
InstallResult InstallNCA(const QString& filename);
|
||||||
void MigrateConfigFiles();
|
void MigrateConfigFiles();
|
||||||
void UpdateWindowTitle(std::string_view title_name = {}, std::string_view title_version = {},
|
void UpdateWindowTitle(std::string_view title_name = {}, std::string_view title_version = {},
|
||||||
|
Loading…
Reference in New Issue
Block a user