mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
Qt: only add version update hint to bootable applications
This commit is contained in:
parent
1c2df15755
commit
1cb1d14d0c
@ -75,8 +75,8 @@ bool game_compatibility::ReadJSON(const QJsonObject& json_data, bool after_downl
|
||||
// Add date if possible
|
||||
status.date = json_result.value("date").toString();
|
||||
|
||||
// Add version if possible
|
||||
status.version = json_result.value("update").toString();
|
||||
// Add latest version if possible
|
||||
status.latest_version = json_result.value("update").toString();
|
||||
|
||||
// Add status to map
|
||||
m_compat_database.emplace(std::pair<std::string, compat_status>(sstr(key), status));
|
||||
|
@ -22,7 +22,7 @@ struct compat_status
|
||||
QString color;
|
||||
QString text;
|
||||
QString tooltip;
|
||||
QString version;
|
||||
QString latest_version;
|
||||
};
|
||||
|
||||
class game_compatibility : public QObject
|
||||
|
@ -1980,16 +1980,22 @@ int game_list_frame::PopulateGameList()
|
||||
|
||||
// Version
|
||||
QString app_version = qstr(game->info.app_ver);
|
||||
const QString unknown = localized.category.unknown;
|
||||
|
||||
if (app_version == localized.category.unknown)
|
||||
if (app_version == unknown)
|
||||
{
|
||||
// Fall back to Disc/Pkg Revision
|
||||
app_version = qstr(game->info.version);
|
||||
}
|
||||
|
||||
if (!game->compat.version.isEmpty() && (app_version == localized.category.unknown || game->compat.version.toDouble() > app_version.toDouble()))
|
||||
if (game->info.bootable && !game->compat.latest_version.isEmpty())
|
||||
{
|
||||
app_version = tr("%0 (Update available: %1)").arg(app_version, game->compat.version);
|
||||
// If the app is bootable and the compat database contains info about the latest patch version:
|
||||
// add a hint for available software updates if the app version is unknown or lower than the latest version.
|
||||
if (app_version == unknown || game->compat.latest_version.toDouble() > app_version.toDouble())
|
||||
{
|
||||
app_version = tr("%0 (Update available: %1)").arg(app_version, game->compat.latest_version);
|
||||
}
|
||||
}
|
||||
|
||||
// Playtimes
|
||||
|
Loading…
Reference in New Issue
Block a user