diff --git a/rpcs3/rpcs3qt/game_compatibility.cpp b/rpcs3/rpcs3qt/game_compatibility.cpp index d9414e527f..2fa98c7dfb 100644 --- a/rpcs3/rpcs3qt/game_compatibility.cpp +++ b/rpcs3/rpcs3qt/game_compatibility.cpp @@ -274,10 +274,19 @@ compat::package_info game_compatibility::GetPkgInfo(const QString& pkg_path, gam info.local_cat = data_cat->second; } - // Update packages always seem to have an APP_VER, so let's assume it's a DLC otherwise. - if (info.category == "GD" && info.version.isEmpty()) + if (info.category == "GD") { - info.is_dlc = true; + // For now let's assume that PS3 Game Data packages are always updates or DLC. + // Update packages always seem to have an APP_VER, so let's say it's a DLC otherwise. + // Ideally this would simply be the package content type, but I am too lazy to implement this right now. + if (info.version.isEmpty()) + { + info.type = compat::package_type::dlc; + } + else + { + info.type = compat::package_type::update; + } } } @@ -307,6 +316,9 @@ compat::package_info game_compatibility::GetPkgInfo(const QString& pkg_path, gam info.changelog = qstr(localized_changelog); } + // This should be an update since it was found in a patch set + info.type = compat::package_type::update; + break; } } diff --git a/rpcs3/rpcs3qt/game_compatibility.h b/rpcs3/rpcs3qt/game_compatibility.h index f594d17f47..802702c55d 100644 --- a/rpcs3/rpcs3qt/game_compatibility.h +++ b/rpcs3/rpcs3qt/game_compatibility.h @@ -89,6 +89,14 @@ namespace compat std::vector patch_sets; }; + // The type of the package. In the future this should signify the proper PKG_CONTENT_TYPE. + enum class package_type + { + update, + dlc, + other + }; + /** Concicely represents a specific pkg's localized information for use in the GUI */ struct package_info { @@ -99,7 +107,8 @@ namespace compat QString version; // May be empty QString category; // HG, DG, GD etc. QString local_cat; // Localized category - bool is_dlc = false; // Distinguish between update and DLC if category is GD + + package_type type = package_type::other; // The type of package (Update, DLC or other) }; } diff --git a/rpcs3/rpcs3qt/main_window.cpp b/rpcs3/rpcs3qt/main_window.cpp index b2d15ec0b4..c939c84d17 100644 --- a/rpcs3/rpcs3qt/main_window.cpp +++ b/rpcs3/rpcs3qt/main_window.cpp @@ -515,9 +515,9 @@ void main_window::InstallPackages(QStringList file_paths) compat::package_info info = game_compatibility::GetPkgInfo(file_path, m_game_list_frame ? m_game_list_frame->GetGameCompatibility() : nullptr); - if (info.category == "GD") + if (info.type != compat::package_type::other) { - if (info.is_dlc) + if (info.type == compat::package_type::dlc) { info.local_cat = tr("\nDLC", "Block for package type (DLC)"); } diff --git a/rpcs3/rpcs3qt/pkg_install_dialog.cpp b/rpcs3/rpcs3qt/pkg_install_dialog.cpp index 4afb5c9bd7..de1286abf7 100644 --- a/rpcs3/rpcs3qt/pkg_install_dialog.cpp +++ b/rpcs3/rpcs3qt/pkg_install_dialog.cpp @@ -69,14 +69,14 @@ pkg_install_dialog::pkg_install_dialog(const QStringList& paths, game_compatibil accumulated_info = info.title_id; } - if (info.category == "GD") + if (info.type != compat::package_type::other) { if (!accumulated_info.isEmpty()) { accumulated_info += ", "; } - if (info.is_dlc) + if (info.type == compat::package_type::dlc) { accumulated_info += tr("DLC", "Package type info (DLC)"); }