mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-02 16:53:17 +00:00
- Added trophy decryption when extracting a fpkg. trp icons and xmls are dumped to game_data/<title> (can be restored if deleted by accident by opening the trophy viewer)
- Added a trophy viewer (right click on game ==> trophy viewer) - Enabled Run button. - Switched gui settings to toml. - Added recent files (6 max) - Applied @raphaelthegreat suggestions and corrections (Thanks a lot). - Fixed several bugs and crashes. - Full screen should disabled by default. - Added region in list mode. - Added a simple temp elf list widget. - Added messages when extracting pkg (ex: installing a patch before the game...etc)
This commit is contained in:
parent
71dda8c776
commit
0f27e0edf2
49 changed files with 1616 additions and 891 deletions
|
@ -3,34 +3,20 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <QFuture>
|
||||
#include <QObject>
|
||||
#include <QPixmap>
|
||||
#include <QtConcurrent/QtConcurrent>
|
||||
#include "common/config.h"
|
||||
#include "core/file_format/psf.h"
|
||||
#include "game_list_utils.h"
|
||||
#include "gui_settings.h"
|
||||
|
||||
struct GameInfo {
|
||||
std::string path; // root path of game directory (normaly directory that contains eboot.bin)
|
||||
std::string icon_path; // path of icon0.png
|
||||
std::string pic_path; // path of pic1.png
|
||||
QPixmap icon;
|
||||
std::string size;
|
||||
// variables extracted from param.sfo
|
||||
std::string name = "Unknown";
|
||||
std::string serial = "Unknown";
|
||||
std::string version = "Unknown";
|
||||
std::string category = "Unknown";
|
||||
std::string fw = "Unknown";
|
||||
};
|
||||
|
||||
class GameInfoClass {
|
||||
|
||||
class GameInfoClass : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
void GetGameInfo();
|
||||
|
||||
std::shared_ptr<GuiSettings> m_gui_settings = std::make_shared<GuiSettings>();
|
||||
GameInfoClass();
|
||||
~GameInfoClass();
|
||||
void GetGameInfo(QWidget* parent = nullptr);
|
||||
QVector<GameInfo> m_games;
|
||||
|
||||
static bool CompareStrings(GameInfo& a, GameInfo& b) {
|
||||
|
@ -39,19 +25,17 @@ public:
|
|||
|
||||
static GameInfo readGameInfo(const std::string& filePath) {
|
||||
GameInfo game;
|
||||
GameListUtils game_util;
|
||||
game.size = game_util.GetFolderSize(QDir(QString::fromStdString(filePath))).toStdString();
|
||||
game.path = filePath;
|
||||
|
||||
PSF psf;
|
||||
if (psf.open(game.path + "/sce_sys/param.sfo")) {
|
||||
QString iconpath(QString::fromStdString(game.path) + "/sce_sys/icon0.png");
|
||||
QString picpath(QString::fromStdString(game.path) + "/sce_sys/pic1.png");
|
||||
game.icon_path = iconpath.toStdString();
|
||||
game.icon = QPixmap(iconpath);
|
||||
game.pic_path = picpath.toStdString();
|
||||
if (psf.open(game.path + "/sce_sys/param.sfo", {})) {
|
||||
game.icon_path = game.path + "/sce_sys/icon0.png";
|
||||
QString iconpath = QString::fromStdString(game.icon_path);
|
||||
game.icon = QImage(iconpath);
|
||||
game.pic_path = game.path + "/sce_sys/pic1.png";
|
||||
game.name = psf.GetString("TITLE");
|
||||
game.serial = psf.GetString("TITLE_ID");
|
||||
game.region = GameListUtils::GetRegion(psf.GetString("CONTENT_ID").at(0)).toStdString();
|
||||
u32 fw_int = psf.GetInteger("SYSTEM_VER");
|
||||
QString fw = QString::number(fw_int, 16);
|
||||
QString fw_ = fw.length() > 7 ? QString::number(fw_int, 16).left(3).insert(2, '.')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue