mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-15 22:53:47 +00:00
Qt: add version update hint to game list
This commit is contained in:
parent
40142420c1
commit
ec2d882199
@ -1,4 +1,4 @@
|
||||
#include "game_compatibility.h"
|
||||
#include "game_compatibility.h"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QMessageBox>
|
||||
@ -73,6 +73,9 @@ 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 status to map
|
||||
m_compat_database.emplace(std::pair<std::string, compat_status>(sstr(key), status));
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
@ -22,6 +22,7 @@ struct compat_status
|
||||
QString color;
|
||||
QString text;
|
||||
QString tooltip;
|
||||
QString version;
|
||||
};
|
||||
|
||||
class game_compatibility : public QObject
|
||||
|
@ -1300,11 +1300,19 @@ int game_list_frame::PopulateGameList()
|
||||
compat_item->setData(Qt::DecorationRole, compat_pixmap(game->compat.color));
|
||||
}
|
||||
|
||||
// Version
|
||||
QString app_version = qstr(game->info.app_ver);
|
||||
|
||||
if (!game->compat.version.isEmpty() && (app_version == category::unknown || game->compat.version.toDouble() > app_version.toDouble()))
|
||||
{
|
||||
app_version = tr("%0 (Update available: %1)").arg(app_version, game->compat.version);
|
||||
}
|
||||
|
||||
m_gameList->setItem(row, gui::column_icon, icon_item);
|
||||
m_gameList->setItem(row, gui::column_name, title_item);
|
||||
m_gameList->setItem(row, gui::column_serial, serial_item);
|
||||
m_gameList->setItem(row, gui::column_firmware, new custom_table_widget_item(game->info.fw));
|
||||
m_gameList->setItem(row, gui::column_version, new custom_table_widget_item(game->info.app_ver));
|
||||
m_gameList->setItem(row, gui::column_version, new custom_table_widget_item(app_version));
|
||||
m_gameList->setItem(row, gui::column_category, new custom_table_widget_item(game->info.category));
|
||||
m_gameList->setItem(row, gui::column_path, new custom_table_widget_item(game->info.path));
|
||||
m_gameList->setItem(row, gui::column_move, new custom_table_widget_item(sstr(supports_move ? tr("Supported") : tr("Not Supported")), Qt::UserRole, !supports_move));
|
||||
|
Loading…
Reference in New Issue
Block a user