diff --git a/pcsx2-qt/Settings/GamePatchSettingsWidget.cpp b/pcsx2-qt/Settings/GamePatchSettingsWidget.cpp index 3e1b7ed68f..ae1650c384 100644 --- a/pcsx2-qt/Settings/GamePatchSettingsWidget.cpp +++ b/pcsx2-qt/Settings/GamePatchSettingsWidget.cpp @@ -68,6 +68,8 @@ GamePatchSettingsWidget::GamePatchSettingsWidget(SettingsWindow* dialog, QWidget m_ui.scrollArea->setFrameShape(QFrame::WinPanel); m_ui.scrollArea->setFrameShadow(QFrame::Sunken); + setUnlabeledPatchesWarningVisibility(false); + connect(m_ui.reload, &QPushButton::clicked, this, &GamePatchSettingsWidget::onReloadClicked); reloadList(); @@ -86,10 +88,12 @@ void GamePatchSettingsWidget::onReloadClicked() void GamePatchSettingsWidget::reloadList() { // Patches shouldn't have any unlabelled patch groups, because they're new. - std::vector patches = Patch::GetPatchInfo(m_dialog->getSerial(), m_dialog->getDiscCRC(), false, nullptr); + u32 numberOfUnlabeledPatches = 0; + std::vector patches = Patch::GetPatchInfo(m_dialog->getSerial(), m_dialog->getDiscCRC(), false, &numberOfUnlabeledPatches); std::vector enabled_list = m_dialog->getSettingsInterface()->GetStringList(Patch::PATCHES_CONFIG_SECTION, Patch::PATCH_ENABLE_CONFIG_KEY); + setUnlabeledPatchesWarningVisibility(numberOfUnlabeledPatches > 0); delete m_ui.scrollArea->takeWidget(); QWidget* container = new QWidget(m_ui.scrollArea); @@ -130,3 +134,7 @@ void GamePatchSettingsWidget::reloadList() m_ui.scrollArea->setWidget(container); } + +void GamePatchSettingsWidget::setUnlabeledPatchesWarningVisibility(bool visible) { + m_ui.unlabeledPatchWarning->setVisible(visible); +} \ No newline at end of file diff --git a/pcsx2-qt/Settings/GamePatchSettingsWidget.h b/pcsx2-qt/Settings/GamePatchSettingsWidget.h index 323942f5b5..158be13977 100644 --- a/pcsx2-qt/Settings/GamePatchSettingsWidget.h +++ b/pcsx2-qt/Settings/GamePatchSettingsWidget.h @@ -60,6 +60,7 @@ private Q_SLOTS: private: void reloadList(); + void setUnlabeledPatchesWarningVisibility(bool visible); Ui::GamePatchSettingsWidget m_ui; SettingsWindow* m_dialog; diff --git a/pcsx2-qt/Settings/GamePatchSettingsWidget.ui b/pcsx2-qt/Settings/GamePatchSettingsWidget.ui index ca59c6e793..16e9796634 100644 --- a/pcsx2-qt/Settings/GamePatchSettingsWidget.ui +++ b/pcsx2-qt/Settings/GamePatchSettingsWidget.ui @@ -33,6 +33,13 @@ + + + + Any patches bundled with PCSX2 for this game will be disabled since you have unlabeled patches loaded. + + +