1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-26 12:42:41 +01:00

Qt: Remove default "Unknown" in GameInfo struct

There is no need to initialize these anymore.
The game list already uses its own fallback string constants if needed.
This commit is contained in:
Megamouse 2023-12-02 23:59:15 +01:00
parent a97bad97ae
commit 8ef844ca53
6 changed files with 12 additions and 11 deletions

View File

@ -9,12 +9,12 @@ struct GameInfo
std::string icon_path; std::string icon_path;
std::string movie_path; std::string movie_path;
std::string name = "Unknown"; std::string name;
std::string serial = "Unknown"; std::string serial;
std::string app_ver = "Unknown"; std::string app_ver;
std::string version = "Unknown"; std::string version;
std::string category = "Unknown"; std::string category;
std::string fw = "Unknown"; std::string fw;
u32 attr = 0; u32 attr = 0;
u32 bootable = 0; u32 bootable = 0;

View File

@ -497,6 +497,7 @@ void game_list_frame::OnParsingFinished()
game.serial = dir_or_elf.substr(dir_or_elf.find_last_of(fs::delim) + 1); game.serial = dir_or_elf.substr(dir_or_elf.find_last_of(fs::delim) + 1);
game.category = cat::cat_ps3_os.toStdString(); // Key for operating system executables game.category = cat::cat_ps3_os.toStdString(); // Key for operating system executables
game.version = utils::get_firmware_version(); game.version = utils::get_firmware_version();
game.app_ver = game.version;
game.fw = game.version; game.fw = game.version;
game.bootable = 1; game.bootable = 1;
game.icon_path = dev_flash + "vsh/resource/explore/icon/icon_home.png"; game.icon_path = dev_flash + "vsh/resource/explore/icon/icon_home.png";
@ -516,7 +517,7 @@ void game_list_frame::OnParsingFinished()
} }
} }
if (game.name == "Unknown") if (game.name.empty())
{ {
game.name = game.serial; game.name = game.serial;
} }

View File

@ -66,7 +66,7 @@ void pad_settings_dialog::pad_button::insert_key(const std::string& key, bool ap
text = QString::fromStdString(keys).replace(",", ", "); text = QString::fromStdString(keys).replace(",", ", ");
} }
pad_settings_dialog::pad_settings_dialog(std::shared_ptr<gui_settings> gui_settings, QWidget *parent, const GameInfo *game) pad_settings_dialog::pad_settings_dialog(std::shared_ptr<gui_settings> gui_settings, QWidget* parent, const GameInfo* game)
: QDialog(parent) : QDialog(parent)
, ui(new Ui::pad_settings_dialog) , ui(new Ui::pad_settings_dialog)
, m_gui_settings(std::move(gui_settings)) , m_gui_settings(std::move(gui_settings))

View File

@ -89,7 +89,7 @@ class pad_settings_dialog : public QDialog
const QString Disconnected_suffix = tr(" (disconnected)"); const QString Disconnected_suffix = tr(" (disconnected)");
public: public:
explicit pad_settings_dialog(std::shared_ptr<gui_settings> gui_settings, QWidget *parent = nullptr, const GameInfo *game = nullptr); explicit pad_settings_dialog(std::shared_ptr<gui_settings> gui_settings, QWidget* parent = nullptr, const GameInfo* game = nullptr);
~pad_settings_dialog(); ~pad_settings_dialog();
private Q_SLOTS: private Q_SLOTS:

View File

@ -92,7 +92,7 @@ void remove_item(QComboBox* box, int data_value, int def_value)
extern const std::map<std::string_view, int> g_prx_list; extern const std::map<std::string_view, int> g_prx_list;
settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std::shared_ptr<emu_settings> emu_settings, const int& tab_index, QWidget *parent, const GameInfo* game) settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std::shared_ptr<emu_settings> emu_settings, const int& tab_index, QWidget* parent, const GameInfo* game)
: QDialog(parent) : QDialog(parent)
, m_tab_index(tab_index) , m_tab_index(tab_index)
, ui(new Ui::settings_dialog) , ui(new Ui::settings_dialog)

View File

@ -21,7 +21,7 @@ class settings_dialog : public QDialog
Q_OBJECT Q_OBJECT
public: public:
explicit settings_dialog(std::shared_ptr<gui_settings> gui_settings, std::shared_ptr<emu_settings> emu_settings, const int& tab_index = 0, QWidget *parent = nullptr, const GameInfo *game = nullptr); explicit settings_dialog(std::shared_ptr<gui_settings> gui_settings, std::shared_ptr<emu_settings> emu_settings, const int& tab_index = 0, QWidget* parent = nullptr, const GameInfo* game = nullptr);
~settings_dialog(); ~settings_dialog();
int exec() override; int exec() override;
Q_SIGNALS: Q_SIGNALS: