mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-13 05:05:57 +00:00
Trophy Viewer - Select Game (#2678)
* Trophy Viewer - Select Game * TR - Button in Utils +icon TR - Button in Utils +icon I also made a small correction to the game folder list, where the checkboxes were being filled in incorrectly.
This commit is contained in:
parent
4f8e5dfd7c
commit
16a68d78eb
10 changed files with 193 additions and 14 deletions
|
@ -331,7 +331,33 @@ public:
|
|||
Common::FS::PathToQString(gameTrpPath, game_update_path);
|
||||
}
|
||||
}
|
||||
TrophyViewer* trophyViewer = new TrophyViewer(trophyPath, gameTrpPath);
|
||||
|
||||
// Array with all games and their trophy information
|
||||
QVector<TrophyGameInfo> allTrophyGames;
|
||||
for (const auto& game : m_games) {
|
||||
TrophyGameInfo gameInfo;
|
||||
gameInfo.name = QString::fromStdString(game.name);
|
||||
Common::FS::PathToQString(gameInfo.trophyPath, game.serial);
|
||||
Common::FS::PathToQString(gameInfo.gameTrpPath, game.path);
|
||||
|
||||
auto update_path = Common::FS::PathFromQString(gameInfo.gameTrpPath);
|
||||
update_path += "-UPDATE";
|
||||
if (std::filesystem::exists(update_path)) {
|
||||
Common::FS::PathToQString(gameInfo.gameTrpPath, update_path);
|
||||
} else {
|
||||
update_path = Common::FS::PathFromQString(gameInfo.gameTrpPath);
|
||||
update_path += "-patch";
|
||||
if (std::filesystem::exists(update_path)) {
|
||||
Common::FS::PathToQString(gameInfo.gameTrpPath, update_path);
|
||||
}
|
||||
}
|
||||
|
||||
allTrophyGames.append(gameInfo);
|
||||
}
|
||||
|
||||
QString gameName = QString::fromStdString(m_games[itemID].name);
|
||||
TrophyViewer* trophyViewer =
|
||||
new TrophyViewer(trophyPath, gameTrpPath, gameName, allTrophyGames);
|
||||
trophyViewer->show();
|
||||
connect(widget->parent(), &QWidget::destroyed, trophyViewer,
|
||||
[trophyViewer]() { trophyViewer->deleteLater(); });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue