mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-24 12:25:00 +00:00
More Fixes for Separate Update (#1487)
* handle getdents + fix condition + add info to description * fix not handling dents errors * to not overwrite it, only gather separate update entries when normal folder is done * fix always setting entries to 0 and guest name including "UPDATE" * reset indexes on completion * don't use concat, fixes long standing bug * make sce_module module loading take both paths into account
This commit is contained in:
parent
3c8e25e8e4
commit
aa5c1c10df
6 changed files with 119 additions and 29 deletions
|
@ -122,11 +122,11 @@ public:
|
|||
|
||||
if (selected == &openSfoViewer) {
|
||||
PSF psf;
|
||||
QString game_update_path;
|
||||
Common::FS::PathToQString(game_update_path, m_games[itemID].path.concat("-UPDATE"));
|
||||
std::filesystem::path game_folder_path = m_games[itemID].path;
|
||||
if (std::filesystem::exists(Common::FS::PathFromQString(game_update_path))) {
|
||||
game_folder_path = Common::FS::PathFromQString(game_update_path);
|
||||
std::filesystem::path game_update_path = game_folder_path;
|
||||
game_update_path += "UPDATE";
|
||||
if (std::filesystem::exists(game_update_path)) {
|
||||
game_folder_path = game_update_path;
|
||||
}
|
||||
if (psf.Open(game_folder_path / "sce_sys" / "param.sfo")) {
|
||||
int rows = psf.GetEntries().size();
|
||||
|
@ -320,21 +320,17 @@ public:
|
|||
bool error = false;
|
||||
QString folder_path, game_update_path, dlc_path;
|
||||
Common::FS::PathToQString(folder_path, m_games[itemID].path);
|
||||
Common::FS::PathToQString(game_update_path, m_games[itemID].path.concat("-UPDATE"));
|
||||
game_update_path = folder_path + "-UPDATE";
|
||||
Common::FS::PathToQString(
|
||||
dlc_path, Config::getAddonInstallDir() /
|
||||
Common::FS::PathFromQString(folder_path).parent_path().filename());
|
||||
QString message_type = tr("Game");
|
||||
|
||||
if (selected == deleteUpdate) {
|
||||
if (!Config::getSeparateUpdateEnabled()) {
|
||||
QMessageBox::critical(nullptr, tr("Error"),
|
||||
QString(tr("requiresEnableSeparateUpdateFolder_MSG")));
|
||||
error = true;
|
||||
} else if (!std::filesystem::exists(
|
||||
Common::FS::PathFromQString(game_update_path))) {
|
||||
QMessageBox::critical(nullptr, tr("Error"),
|
||||
QString(tr("This game has no update to delete!")));
|
||||
if (!std::filesystem::exists(Common::FS::PathFromQString(game_update_path))) {
|
||||
QMessageBox::critical(
|
||||
nullptr, tr("Error"),
|
||||
QString(tr("This game has no separate update to delete!")));
|
||||
error = true;
|
||||
} else {
|
||||
folder_path = game_update_path;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue