mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 00:11:24 +12:00
Try to distinguish between Update and DLC (Part 2)
This commit is contained in:
parent
cde802b16c
commit
36189b8c3b
4 changed files with 29 additions and 8 deletions
|
@ -274,10 +274,19 @@ compat::package_info game_compatibility::GetPkgInfo(const QString& pkg_path, gam
|
||||||
info.local_cat = data_cat->second;
|
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")
|
||||||
if (info.category == "GD" && info.version.isEmpty())
|
|
||||||
{
|
{
|
||||||
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);
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,6 +89,14 @@ namespace compat
|
||||||
std::vector<pkg_patchset> patch_sets;
|
std::vector<pkg_patchset> 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 */
|
/** Concicely represents a specific pkg's localized information for use in the GUI */
|
||||||
struct package_info
|
struct package_info
|
||||||
{
|
{
|
||||||
|
@ -99,7 +107,8 @@ namespace compat
|
||||||
QString version; // May be empty
|
QString version; // May be empty
|
||||||
QString category; // HG, DG, GD etc.
|
QString category; // HG, DG, GD etc.
|
||||||
QString local_cat; // Localized category
|
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)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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);
|
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)");
|
info.local_cat = tr("\nDLC", "Block for package type (DLC)");
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,14 +69,14 @@ pkg_install_dialog::pkg_install_dialog(const QStringList& paths, game_compatibil
|
||||||
accumulated_info = info.title_id;
|
accumulated_info = info.title_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info.category == "GD")
|
if (info.type != compat::package_type::other)
|
||||||
{
|
{
|
||||||
if (!accumulated_info.isEmpty())
|
if (!accumulated_info.isEmpty())
|
||||||
{
|
{
|
||||||
accumulated_info += ", ";
|
accumulated_info += ", ";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info.is_dlc)
|
if (info.type == compat::package_type::dlc)
|
||||||
{
|
{
|
||||||
accumulated_info += tr("DLC", "Package type info (DLC)");
|
accumulated_info += tr("DLC", "Package type info (DLC)");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue