From 12196359f7a5788d4e719d51299e2b8b2ad58822 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 28 Jan 2024 20:07:03 +1000 Subject: [PATCH] Qt: Deprecate per-game WS/NI toggles in favor of Patches --- pcsx2-qt/Settings/GraphicsSettingsWidget.cpp | 20 ++++++++++++++++++++ pcsx2-qt/Settings/GraphicsSettingsWidget.ui | 2 +- pcsx2/ImGui/FullscreenUI.cpp | 13 +++++++++---- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp b/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp index a999a518af..909ce801a4 100644 --- a/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp +++ b/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp @@ -300,6 +300,26 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget* } #endif + // Get rid of widescreen/no-interlace checkboxes from per-game settings, unless the user previously had them set. + if (m_dialog->isPerGameSettings()) + { + if ((m_dialog->containsSettingValue("EmuCore", "EnableWideScreenPatches") || m_dialog->containsSettingValue("EmuCore", "EnableNoInterlacingPatches")) && + QMessageBox::question(QtUtils::GetRootWidget(this), tr("Remove Unsupported Settings"), + tr("You currently have the Enable Widescreen Patches or Enable No-Interlacing Patches options enabled for this game.

" + "We no longer support these options, instead you should select the \"Patches\" section, and explicitly enable the patches you want.

" + "Do you want to remove these options from your game configuration now?"), + QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes) + { + m_dialog->removeSettingValue("EmuCore", "EnableWideScreenPatches"); + m_dialog->removeSettingValue("EmuCore", "EnableNoInterlacingPatches"); + } + + m_ui.gridLayout->removeWidget(m_ui.widescreenPatches); + m_ui.gridLayout->removeWidget(m_ui.noInterlacingPatches); + safe_delete(m_ui.widescreenPatches); + safe_delete(m_ui.noInterlacingPatches); + } + // Hide advanced options by default. if (!QtHost::ShouldShowAdvancedSettings()) { diff --git a/pcsx2-qt/Settings/GraphicsSettingsWidget.ui b/pcsx2-qt/Settings/GraphicsSettingsWidget.ui index b96d21e460..923d07bb3a 100644 --- a/pcsx2-qt/Settings/GraphicsSettingsWidget.ui +++ b/pcsx2-qt/Settings/GraphicsSettingsWidget.ui @@ -324,7 +324,7 @@ - + diff --git a/pcsx2/ImGui/FullscreenUI.cpp b/pcsx2/ImGui/FullscreenUI.cpp index cbb20e10fb..95028ad424 100644 --- a/pcsx2/ImGui/FullscreenUI.cpp +++ b/pcsx2/ImGui/FullscreenUI.cpp @@ -3272,10 +3272,15 @@ void FullscreenUI::DrawGraphicsSettingsPage() "EmuCore/GS", "StretchY", 100, 10, 300, FSUI_CSTR("%d%%")); DrawIntRectSetting(bsi, FSUI_CSTR("Crop"), FSUI_CSTR("Crops the image, while respecting aspect ratio."), "EmuCore/GS", "CropLeft", 0, "CropTop", 0, "CropRight", 0, "CropBottom", 0, 0, 720, 1, FSUI_CSTR("%dpx")); - DrawToggleSetting(bsi, FSUI_CSTR("Enable Widescreen Patches"), FSUI_CSTR("Enables loading widescreen patches from pnach files."), - "EmuCore", "EnableWideScreenPatches", false); - DrawToggleSetting(bsi, FSUI_CSTR("Enable No-Interlacing Patches"), - FSUI_CSTR("Enables loading no-interlacing patches from pnach files."), "EmuCore", "EnableNoInterlacingPatches", false); + + if (!IsEditingGameSettings(bsi)) + { + DrawToggleSetting(bsi, FSUI_CSTR("Enable Widescreen Patches"), FSUI_CSTR("Enables loading widescreen patches from pnach files."), + "EmuCore", "EnableWideScreenPatches", false); + DrawToggleSetting(bsi, FSUI_CSTR("Enable No-Interlacing Patches"), + FSUI_CSTR("Enables loading no-interlacing patches from pnach files."), "EmuCore", "EnableNoInterlacingPatches", false); + } + DrawIntListSetting(bsi, FSUI_CSTR("Bilinear Upscaling"), FSUI_CSTR("Smooths out the image when upscaling the console to the screen."), "EmuCore/GS", "linear_present_mode", static_cast(GSPostBilinearMode::BilinearSharp), s_bilinear_present_options, std::size(s_bilinear_present_options), true);