mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-11-23 03:09:55 +00:00
qt: Error if installing DLC without game. (#1476)
Some checks failed
Build and Release / reuse (push) Has been cancelled
Build and Release / clang-format (push) Has been cancelled
Build and Release / get-info (push) Has been cancelled
Build and Release / windows-sdl (push) Has been cancelled
Build and Release / windows-qt (push) Has been cancelled
Build and Release / macos-sdl (push) Has been cancelled
Build and Release / macos-qt (push) Has been cancelled
Build and Release / linux-sdl (push) Has been cancelled
Build and Release / linux-qt (push) Has been cancelled
Build and Release / pre-release (push) Has been cancelled
Some checks failed
Build and Release / reuse (push) Has been cancelled
Build and Release / clang-format (push) Has been cancelled
Build and Release / get-info (push) Has been cancelled
Build and Release / windows-sdl (push) Has been cancelled
Build and Release / windows-qt (push) Has been cancelled
Build and Release / macos-sdl (push) Has been cancelled
Build and Release / macos-qt (push) Has been cancelled
Build and Release / linux-sdl (push) Has been cancelled
Build and Release / linux-qt (push) Has been cancelled
Build and Release / pre-release (push) Has been cancelled
This commit is contained in:
parent
29183354cc
commit
76f440889b
@ -673,6 +673,12 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int
|
|||||||
QMessageBox::critical(this, tr("PKG ERROR"), QString::fromStdString(failreason));
|
QMessageBox::critical(this, tr("PKG ERROR"), QString::fromStdString(failreason));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!psf.Open(pkg.sfo)) {
|
||||||
|
QMessageBox::critical(this, tr("PKG ERROR"),
|
||||||
|
"Could not read SFO. Check log for details");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
auto category = psf.GetString("CATEGORY");
|
||||||
InstallDirSelect ids;
|
InstallDirSelect ids;
|
||||||
ids.exec();
|
ids.exec();
|
||||||
auto game_install_dir = ids.getSelectedDirectory();
|
auto game_install_dir = ids.getSelectedDirectory();
|
||||||
@ -689,12 +695,6 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int
|
|||||||
QMessageBox msgBox;
|
QMessageBox msgBox;
|
||||||
msgBox.setWindowTitle(tr("PKG Extraction"));
|
msgBox.setWindowTitle(tr("PKG Extraction"));
|
||||||
|
|
||||||
if (!psf.Open(pkg.sfo)) {
|
|
||||||
QMessageBox::critical(this, tr("PKG ERROR"),
|
|
||||||
"Could not read SFO. Check log for details");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string content_id;
|
std::string content_id;
|
||||||
if (auto value = psf.GetString("CONTENT_ID"); value.has_value()) {
|
if (auto value = psf.GetString("CONTENT_ID"); value.has_value()) {
|
||||||
content_id = std::string{*value};
|
content_id = std::string{*value};
|
||||||
@ -709,7 +709,6 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int
|
|||||||
QString addonDirPath;
|
QString addonDirPath;
|
||||||
Common::FS::PathToQString(addonDirPath, addon_extract_path);
|
Common::FS::PathToQString(addonDirPath, addon_extract_path);
|
||||||
QDir addon_dir(addonDirPath);
|
QDir addon_dir(addonDirPath);
|
||||||
auto category = psf.GetString("CATEGORY");
|
|
||||||
|
|
||||||
if (pkgType.contains("PATCH")) {
|
if (pkgType.contains("PATCH")) {
|
||||||
QString pkg_app_version;
|
QString pkg_app_version;
|
||||||
@ -802,9 +801,10 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Do nothing;
|
// Do nothing;
|
||||||
if (pkgType.contains("PATCH")) {
|
if (pkgType.contains("PATCH") || category == "ac") {
|
||||||
QMessageBox::information(this, tr("PKG Extraction"),
|
QMessageBox::information(
|
||||||
tr("PKG is a patch, please install the game first!"));
|
this, tr("PKG Extraction"),
|
||||||
|
tr("PKG is a patch or DLC, please install the game first!"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// what else?
|
// what else?
|
||||||
|
Loading…
Reference in New Issue
Block a user