diff --git a/pcsx2-qt/Settings/GameCheatSettingsWidget.cpp b/pcsx2-qt/Settings/GameCheatSettingsWidget.cpp index f804c02af2..1eaab7b48a 100644 --- a/pcsx2-qt/Settings/GameCheatSettingsWidget.cpp +++ b/pcsx2-qt/Settings/GameCheatSettingsWidget.cpp @@ -124,7 +124,7 @@ void GameCheatSettingsWidget::updateListEnabled() m_ui.enableAll->setEnabled(cheats_enabled); m_ui.disableAll->setEnabled(cheats_enabled); m_ui.reloadCheats->setEnabled(cheats_enabled); - m_ui.allCRCsCheckbox->setEnabled(cheats_enabled); + m_ui.allCRCsCheckbox->setEnabled(cheats_enabled && !m_dialog->getSerial().empty()); m_ui.searchText->setEnabled(cheats_enabled); } @@ -210,6 +210,7 @@ void GameCheatSettingsWidget::reloadList() m_parent_map.clear(); m_model->removeRows(0, m_model->rowCount()); + m_ui.allCRCsCheckbox->setEnabled(!m_dialog->getSerial().empty() && m_ui.cheatList->isEnabled()); for (const Patch::PatchInfo& pi : m_patches) { diff --git a/pcsx2-qt/Settings/GamePatchSettingsWidget.cpp b/pcsx2-qt/Settings/GamePatchSettingsWidget.cpp index 62bced91d6..b7ab8da958 100644 --- a/pcsx2-qt/Settings/GamePatchSettingsWidget.cpp +++ b/pcsx2-qt/Settings/GamePatchSettingsWidget.cpp @@ -124,6 +124,7 @@ void GamePatchSettingsWidget::reloadList() setGlobalWsPatchNoteVisibility(ws_patches_enabled_globally); setGlobalNiPatchNoteVisibility(ni_patches_enabled_globally); delete m_ui.scrollArea->takeWidget(); + m_ui.allCRCsCheckbox->setEnabled(!m_dialog->getSerial().empty()); QWidget* container = new QWidget(m_ui.scrollArea); QVBoxLayout* layout = new QVBoxLayout(container); diff --git a/pcsx2/Patch.cpp b/pcsx2/Patch.cpp index bfd2fa33f5..86e9328289 100644 --- a/pcsx2/Patch.cpp +++ b/pcsx2/Patch.cpp @@ -368,12 +368,14 @@ bool Patch::OpenPatchesZip() std::string Patch::GetPnachTemplate(const std::string_view serial, u32 crc, bool include_serial, bool add_wildcard, bool all_crcs) { pxAssert(!all_crcs || (include_serial && add_wildcard)); - if (all_crcs) - return fmt::format("{}_*.pnach", serial); - else if (include_serial) - return fmt::format("{}_{:08X}{}.pnach", serial, crc, add_wildcard ? "*" : ""); - else - return fmt::format("{:08X}{}.pnach", crc, add_wildcard ? "*" : ""); + if (!serial.empty()) + { + if (all_crcs) + return fmt::format("{}_*.pnach", serial); + else if (include_serial) + return fmt::format("{}_{:08X}{}.pnach", serial, crc, add_wildcard ? "*" : ""); + } + return fmt::format("{:08X}{}.pnach", crc, add_wildcard ? "*" : ""); } std::vector Patch::FindPatchFilesOnDisk(const std::string_view serial, u32 crc, bool cheats, bool all_crcs)