mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 00:41:26 +12:00
Qt: only add version update hint to bootable applications
This commit is contained in:
parent
1c2df15755
commit
1cb1d14d0c
3 changed files with 12 additions and 6 deletions
|
@ -75,8 +75,8 @@ bool game_compatibility::ReadJSON(const QJsonObject& json_data, bool after_downl
|
||||||
// Add date if possible
|
// Add date if possible
|
||||||
status.date = json_result.value("date").toString();
|
status.date = json_result.value("date").toString();
|
||||||
|
|
||||||
// Add version if possible
|
// Add latest version if possible
|
||||||
status.version = json_result.value("update").toString();
|
status.latest_version = json_result.value("update").toString();
|
||||||
|
|
||||||
// Add status to map
|
// Add status to map
|
||||||
m_compat_database.emplace(std::pair<std::string, compat_status>(sstr(key), status));
|
m_compat_database.emplace(std::pair<std::string, compat_status>(sstr(key), status));
|
||||||
|
|
|
@ -22,7 +22,7 @@ struct compat_status
|
||||||
QString color;
|
QString color;
|
||||||
QString text;
|
QString text;
|
||||||
QString tooltip;
|
QString tooltip;
|
||||||
QString version;
|
QString latest_version;
|
||||||
};
|
};
|
||||||
|
|
||||||
class game_compatibility : public QObject
|
class game_compatibility : public QObject
|
||||||
|
|
|
@ -1980,16 +1980,22 @@ int game_list_frame::PopulateGameList()
|
||||||
|
|
||||||
// Version
|
// Version
|
||||||
QString app_version = qstr(game->info.app_ver);
|
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
|
// Fall back to Disc/Pkg Revision
|
||||||
app_version = qstr(game->info.version);
|
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
|
// Playtimes
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue