mirror of https://github.com/PCSX2/pcsx2.git
Partially revert "Qt/Patches: Get rid of the global WS/NI toggle"
This reverts commit cc9f7e723a
.
This commit is contained in:
parent
b01359e06f
commit
c334040a96
|
@ -88,6 +88,8 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
|
||||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.interlacing, "EmuCore/GS", "deinterlace_mode", DEFAULT_INTERLACE_MODE);
|
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.interlacing, "EmuCore/GS", "deinterlace_mode", DEFAULT_INTERLACE_MODE);
|
||||||
SettingWidgetBinder::BindWidgetToIntSetting(
|
SettingWidgetBinder::BindWidgetToIntSetting(
|
||||||
sif, m_ui.bilinearFiltering, "EmuCore/GS", "linear_present_mode", static_cast<int>(GSPostBilinearMode::BilinearSmooth));
|
sif, m_ui.bilinearFiltering, "EmuCore/GS", "linear_present_mode", static_cast<int>(GSPostBilinearMode::BilinearSmooth));
|
||||||
|
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.widescreenPatches, "EmuCore", "EnableWideScreenPatches", false);
|
||||||
|
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.noInterlacingPatches, "EmuCore", "EnableNoInterlacingPatches", false);
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.integerScaling, "EmuCore/GS", "IntegerScaling", false);
|
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.integerScaling, "EmuCore/GS", "IntegerScaling", false);
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.PCRTCOffsets, "EmuCore/GS", "pcrtc_offsets", false);
|
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.PCRTCOffsets, "EmuCore/GS", "pcrtc_offsets", false);
|
||||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.PCRTCOverscan, "EmuCore/GS", "pcrtc_overscan", false);
|
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.PCRTCOverscan, "EmuCore/GS", "pcrtc_overscan", false);
|
||||||
|
@ -319,22 +321,24 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Prompt user to get rid of widescreen/no-interlace config from the ini if the user has enabled them before.
|
// Get rid of widescreen/no-interlace checkboxes from per-game settings, unless the user previously had them set.
|
||||||
if ((m_dialog->getBoolValue("EmuCore", "EnableWideScreenPatches", false) == true ||
|
if (m_dialog->isPerGameSettings())
|
||||||
m_dialog->getBoolValue("EmuCore", "EnableWideScreenPatches", false) == true) &&
|
|
||||||
!m_dialog->containsSettingValue("UI", "UserHasDeniedWSPatchWarning"))
|
|
||||||
{
|
{
|
||||||
if (QMessageBox::question(QtUtils::GetRootWidget(this), tr("Remove Unsupported Settings"),
|
if ((m_dialog->containsSettingValue("EmuCore", "EnableWideScreenPatches") || m_dialog->containsSettingValue("EmuCore", "EnableNoInterlacingPatches")) &&
|
||||||
tr("You previously had the <strong>Enable Widescreen Patches</strong> or <strong>Enable No-Interlacing Patches</strong> options enabled.<br><br>"
|
QMessageBox::question(QtUtils::GetRootWidget(this), tr("Remove Unsupported Settings"),
|
||||||
"We no longer provide these options, instead <strong>you should go to the \"Patches\" section on the per-game settings, and explicitly enable the patches that you want.</strong><br><br>"
|
tr("You currently have the <strong>Enable Widescreen Patches</strong> or <strong>Enable No-Interlacing Patches</strong> options enabled for this game.<br><br>"
|
||||||
"Do you want to remove these options from your configuration now?"),
|
"We no longer support these options, instead <strong>you should select the \"Patches\" section, and explicitly enable the patches you want.</strong><br><br>"
|
||||||
|
"Do you want to remove these options from your game configuration now?"),
|
||||||
QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes)
|
QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes)
|
||||||
{
|
{
|
||||||
m_dialog->removeSettingValue("EmuCore", "EnableWideScreenPatches");
|
m_dialog->removeSettingValue("EmuCore", "EnableWideScreenPatches");
|
||||||
m_dialog->removeSettingValue("EmuCore", "EnableNoInterlacingPatches");
|
m_dialog->removeSettingValue("EmuCore", "EnableNoInterlacingPatches");
|
||||||
}
|
}
|
||||||
else
|
|
||||||
m_dialog->setBoolSettingValue("UI", "UserHasDeniedWSPatchWarning", true);
|
m_ui.displayGridLayout->removeWidget(m_ui.widescreenPatches);
|
||||||
|
m_ui.displayGridLayout->removeWidget(m_ui.noInterlacingPatches);
|
||||||
|
safe_delete(m_ui.widescreenPatches);
|
||||||
|
safe_delete(m_ui.noInterlacingPatches);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hide advanced options by default.
|
// Hide advanced options by default.
|
||||||
|
@ -427,6 +431,12 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
|
||||||
|
|
||||||
// Display tab
|
// Display tab
|
||||||
{
|
{
|
||||||
|
dialog->registerWidgetHelp(m_ui.widescreenPatches, tr("Enable Widescreen Patches"), tr("Unchecked"),
|
||||||
|
tr("Automatically loads and applies widescreen patches on game start. Can cause issues."));
|
||||||
|
|
||||||
|
dialog->registerWidgetHelp(m_ui.noInterlacingPatches, tr("Enable No-Interlacing Patches"), tr("Unchecked"),
|
||||||
|
tr("Automatically loads and applies no-interlacing patches on game start. Can cause issues."));
|
||||||
|
|
||||||
dialog->registerWidgetHelp(m_ui.DisableInterlaceOffset, tr("Disable Interlace Offset"), tr("Unchecked"),
|
dialog->registerWidgetHelp(m_ui.DisableInterlaceOffset, tr("Disable Interlace Offset"), tr("Unchecked"),
|
||||||
tr("Disables interlacing offset which may reduce blurring in some situations."));
|
tr("Disables interlacing offset which may reduce blurring in some situations."));
|
||||||
|
|
||||||
|
|
|
@ -404,28 +404,28 @@
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="0" colspan="2">
|
<item row="8" column="0" colspan="2">
|
||||||
<layout class="QGridLayout" name="displayGridLayout">
|
<layout class="QGridLayout" name="displayGridLayout">
|
||||||
<item row="0" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QCheckBox" name="integerScaling">
|
<widget class="QCheckBox" name="integerScaling">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Integer Scaling</string>
|
<string>Integer Scaling</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QCheckBox" name="PCRTCOverscan">
|
<widget class="QCheckBox" name="widescreenPatches">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Show Overscan</string>
|
<string>Apply Widescreen Patches</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QCheckBox" name="noInterlacingPatches">
|
||||||
|
<property name="text">
|
||||||
|
<string>Apply No-Interlacing Patches</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QCheckBox" name="PCRTCOffsets">
|
|
||||||
<property name="text">
|
|
||||||
<string>Screen Offsets</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QCheckBox" name="PCRTCAntiBlur">
|
<widget class="QCheckBox" name="PCRTCAntiBlur">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Anti-Blur</string>
|
<string>Anti-Blur</string>
|
||||||
|
@ -435,13 +435,27 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="QCheckBox" name="DisableInterlaceOffset">
|
<widget class="QCheckBox" name="DisableInterlaceOffset">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Disable Interlace Offset</string>
|
<string>Disable Interlace Offset</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QCheckBox" name="PCRTCOffsets">
|
||||||
|
<property name="text">
|
||||||
|
<string>Screen Offsets</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QCheckBox" name="PCRTCOverscan">
|
||||||
|
<property name="text">
|
||||||
|
<string>Show Overscan</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
@ -2111,7 +2125,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="10" column="0" colspan="2">
|
<item row="10" column="0" colspan="2">
|
||||||
<layout class="QGridLayout" name="advancedOptionsGrid">
|
<layout class="QGridLayout" name="gridLayout_9">
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QCheckBox" name="disableMailboxPresentation">
|
<widget class="QCheckBox" name="disableMailboxPresentation">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|
|
@ -1268,6 +1268,8 @@ struct Pcsx2Config
|
||||||
EnablePatches : 1, // enables patch detection and application
|
EnablePatches : 1, // enables patch detection and application
|
||||||
EnableCheats : 1, // enables cheat detection and application
|
EnableCheats : 1, // enables cheat detection and application
|
||||||
EnablePINE : 1, // enables inter-process communication
|
EnablePINE : 1, // enables inter-process communication
|
||||||
|
EnableWideScreenPatches : 1,
|
||||||
|
EnableNoInterlacingPatches : 1,
|
||||||
EnableFastBoot : 1,
|
EnableFastBoot : 1,
|
||||||
EnableFastBootFastForward : 1,
|
EnableFastBootFastForward : 1,
|
||||||
EnableThreadPinning : 1,
|
EnableThreadPinning : 1,
|
||||||
|
|
|
@ -3705,6 +3705,15 @@ void FullscreenUI::DrawGraphicsSettingsPage(SettingsInterface* bsi, bool show_ad
|
||||||
"EmuCore/GS", "StretchY", 100, 10, 300, FSUI_CSTR("%d%%"));
|
"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,
|
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"));
|
"CropTop", 0, "CropRight", 0, "CropBottom", 0, 0, 720, 1, FSUI_CSTR("%dpx"));
|
||||||
|
|
||||||
|
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."),
|
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<int>(GSPostBilinearMode::BilinearSharp), s_bilinear_present_options,
|
"EmuCore/GS", "linear_present_mode", static_cast<int>(GSPostBilinearMode::BilinearSharp), s_bilinear_present_options,
|
||||||
std::size(s_bilinear_present_options), true);
|
std::size(s_bilinear_present_options), true);
|
||||||
|
|
|
@ -397,9 +397,10 @@ __ri void ImGuiManager::DrawSettingsOverlay(float scale, float margin, float spa
|
||||||
EmuConfig.Cpu.Recompiler.GetEEClampMode(), static_cast<unsigned>(EmuConfig.Cpu.VU0FPCR.GetRoundMode()),
|
EmuConfig.Cpu.Recompiler.GetEEClampMode(), static_cast<unsigned>(EmuConfig.Cpu.VU0FPCR.GetRoundMode()),
|
||||||
EmuConfig.Cpu.Recompiler.GetVUClampMode(), EmuConfig.GS.VsyncQueueSize);
|
EmuConfig.Cpu.Recompiler.GetVUClampMode(), EmuConfig.GS.VsyncQueueSize);
|
||||||
|
|
||||||
if (EmuConfig.EnableCheats)
|
if (EmuConfig.EnableCheats || EmuConfig.EnableWideScreenPatches || EmuConfig.EnableNoInterlacingPatches)
|
||||||
{
|
{
|
||||||
APPEND("CHT ");
|
APPEND("C={}{}{} ", EmuConfig.EnableCheats ? "C" : "", EmuConfig.EnableWideScreenPatches ? "W" : "",
|
||||||
|
EmuConfig.EnableNoInterlacingPatches ? "N" : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GSIsHardwareRenderer())
|
if (GSIsHardwareRenderer())
|
||||||
|
|
|
@ -163,6 +163,9 @@ namespace Patch
|
||||||
static void writeCheat();
|
static void writeCheat();
|
||||||
static void handle_extended_t(const PatchCommand* p);
|
static void handle_extended_t(const PatchCommand* p);
|
||||||
|
|
||||||
|
// Name of patches which will be auto-enabled based on global options.
|
||||||
|
static constexpr std::string_view WS_PATCH_NAME = "Widescreen 16:9";
|
||||||
|
static constexpr std::string_view NI_PATCH_NAME = "No-Interlacing";
|
||||||
static constexpr std::string_view PATCHES_ZIP_NAME = "patches.zip";
|
static constexpr std::string_view PATCHES_ZIP_NAME = "patches.zip";
|
||||||
|
|
||||||
const char* PATCHES_CONFIG_SECTION = "Patches";
|
const char* PATCHES_CONFIG_SECTION = "Patches";
|
||||||
|
@ -585,6 +588,24 @@ void Patch::ReloadEnabledLists()
|
||||||
s_enabled_cheats = {};
|
s_enabled_cheats = {};
|
||||||
|
|
||||||
s_enabled_patches = Host::GetStringListSetting(PATCHES_CONFIG_SECTION, PATCH_ENABLE_CONFIG_KEY);
|
s_enabled_patches = Host::GetStringListSetting(PATCHES_CONFIG_SECTION, PATCH_ENABLE_CONFIG_KEY);
|
||||||
|
|
||||||
|
// Name based matching for widescreen/NI settings.
|
||||||
|
if (EmuConfig.EnableWideScreenPatches)
|
||||||
|
{
|
||||||
|
if (std::none_of(s_enabled_patches.begin(), s_enabled_patches.end(),
|
||||||
|
[](const std::string& it) { return (it == WS_PATCH_NAME); }))
|
||||||
|
{
|
||||||
|
s_enabled_patches.emplace_back(WS_PATCH_NAME);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (EmuConfig.EnableNoInterlacingPatches)
|
||||||
|
{
|
||||||
|
if (std::none_of(s_enabled_patches.begin(), s_enabled_patches.end(),
|
||||||
|
[](const std::string& it) { return (it == NI_PATCH_NAME); }))
|
||||||
|
{
|
||||||
|
s_enabled_patches.emplace_back(NI_PATCH_NAME);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 Patch::EnablePatches(const PatchList& patches, const EnablePatchList& enable_list)
|
u32 Patch::EnablePatches(const PatchList& patches, const EnablePatchList& enable_list)
|
||||||
|
|
|
@ -1922,6 +1922,8 @@ void Pcsx2Config::LoadSaveCore(SettingsWrapper& wrap)
|
||||||
SettingsWrapBitBool(EnablePatches);
|
SettingsWrapBitBool(EnablePatches);
|
||||||
SettingsWrapBitBool(EnableCheats);
|
SettingsWrapBitBool(EnableCheats);
|
||||||
SettingsWrapBitBool(EnablePINE);
|
SettingsWrapBitBool(EnablePINE);
|
||||||
|
SettingsWrapBitBool(EnableWideScreenPatches);
|
||||||
|
SettingsWrapBitBool(EnableNoInterlacingPatches);
|
||||||
SettingsWrapBitBool(EnableFastBoot);
|
SettingsWrapBitBool(EnableFastBoot);
|
||||||
SettingsWrapBitBool(EnableFastBootFastForward);
|
SettingsWrapBitBool(EnableFastBootFastForward);
|
||||||
SettingsWrapBitBool(EnableThreadPinning);
|
SettingsWrapBitBool(EnableThreadPinning);
|
||||||
|
|
|
@ -2891,6 +2891,8 @@ void VMManager::CheckForEmulationSpeedConfigChanges(const Pcsx2Config& old_confi
|
||||||
void VMManager::CheckForPatchConfigChanges(const Pcsx2Config& old_config)
|
void VMManager::CheckForPatchConfigChanges(const Pcsx2Config& old_config)
|
||||||
{
|
{
|
||||||
if (EmuConfig.EnableCheats == old_config.EnableCheats &&
|
if (EmuConfig.EnableCheats == old_config.EnableCheats &&
|
||||||
|
EmuConfig.EnableWideScreenPatches == old_config.EnableWideScreenPatches &&
|
||||||
|
EmuConfig.EnableNoInterlacingPatches == old_config.EnableNoInterlacingPatches &&
|
||||||
EmuConfig.EnablePatches == old_config.EnablePatches)
|
EmuConfig.EnablePatches == old_config.EnablePatches)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue