diff --git a/pcsx2-qt/Settings/GameCheatSettingsWidget.cpp b/pcsx2-qt/Settings/GameCheatSettingsWidget.cpp index 1eaab7b48a..586b40ea1a 100644 --- a/pcsx2-qt/Settings/GameCheatSettingsWidget.cpp +++ b/pcsx2-qt/Settings/GameCheatSettingsWidget.cpp @@ -56,6 +56,7 @@ GameCheatSettingsWidget::GameCheatSettingsWidget(SettingsWindow* dialog, QWidget m_model_proxy->setFilterFixedString(text); m_ui.cheatList->expandAll(); }); + connect(m_dialog, &SettingsWindow::discSerialChanged, this, &GameCheatSettingsWidget::reloadList); dialog->registerWidgetHelp(m_ui.allCRCsCheckbox, tr("Show Cheats For All CRCs"), tr("Checked"), tr("Toggles scanning patch files for all CRCs of the game. With this enabled available patches for the game serial with different CRCs will also be loaded.")); diff --git a/pcsx2-qt/Settings/GamePatchSettingsWidget.cpp b/pcsx2-qt/Settings/GamePatchSettingsWidget.cpp index b7ab8da958..0e830b1115 100644 --- a/pcsx2-qt/Settings/GamePatchSettingsWidget.cpp +++ b/pcsx2-qt/Settings/GamePatchSettingsWidget.cpp @@ -81,6 +81,7 @@ GamePatchSettingsWidget::GamePatchSettingsWidget(SettingsWindow* dialog, QWidget connect(m_ui.reload, &QPushButton::clicked, this, &GamePatchSettingsWidget::onReloadClicked); connect(m_ui.allCRCsCheckbox, &QCheckBox::checkStateChanged, this, &GamePatchSettingsWidget::reloadList); + connect(m_dialog, &SettingsWindow::discSerialChanged, this, &GamePatchSettingsWidget::reloadList); dialog->registerWidgetHelp(m_ui.allCRCsCheckbox, tr("Show Patches For All CRCs"), tr("Checked"), tr("Toggles scanning patch files for all CRCs of the game. With this enabled available patches for the game serial with different CRCs will also be loaded.")); diff --git a/pcsx2-qt/Settings/GameSummaryWidget.cpp b/pcsx2-qt/Settings/GameSummaryWidget.cpp index f99db3f7ad..ca58158ff3 100644 --- a/pcsx2-qt/Settings/GameSummaryWidget.cpp +++ b/pcsx2-qt/Settings/GameSummaryWidget.cpp @@ -156,7 +156,15 @@ void GameSummaryWidget::onDiscPathChanged(const QString& value) // force rescan of elf to update the serial g_main_window->rescanFile(m_entry_path); - repopulateCurrentDetails(); + + auto lock = GameList::GetLock(); + const GameList::Entry* entry = GameList::GetEntryForPath(m_entry_path.c_str()); + if (entry) + { + populateDetails(entry); + m_dialog->setSerial(entry->serial); + m_ui.checkWiki->setEnabled(!entry->serial.empty()); + } } void GameSummaryWidget::onDiscPathBrowseClicked() diff --git a/pcsx2-qt/Settings/SettingsWindow.cpp b/pcsx2-qt/Settings/SettingsWindow.cpp index 9db57ebec2..f8c2cd6208 100644 --- a/pcsx2-qt/Settings/SettingsWindow.cpp +++ b/pcsx2-qt/Settings/SettingsWindow.cpp @@ -447,6 +447,12 @@ void SettingsWindow::setWindowTitle(const QString& title) QWidget::setWindowTitle(QStringLiteral("%1 [%2]").arg(title, m_filename)); } +void SettingsWindow::setSerial(std::string serial) +{ + m_serial = std::move(serial); + emit discSerialChanged(); +} + bool SettingsWindow::getEffectiveBoolValue(const char* section, const char* key, bool default_value) const { bool value; diff --git a/pcsx2-qt/Settings/SettingsWindow.h b/pcsx2-qt/Settings/SettingsWindow.h index 33031bcfcd..da77424bb2 100644 --- a/pcsx2-qt/Settings/SettingsWindow.h +++ b/pcsx2-qt/Settings/SettingsWindow.h @@ -72,6 +72,7 @@ public: bool eventFilter(QObject* object, QEvent* event) override; void setWindowTitle(const QString& title); + void setSerial(std::string serial); QString getCategory() const; void setCategory(const char* category); @@ -96,7 +97,7 @@ public: void saveAndReloadGameSettings(); Q_SIGNALS: - void settingsResetToDefaults(); + void discSerialChanged(); private Q_SLOTS: void onCategoryCurrentRowChanged(int row);