diff --git a/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp b/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp index 679231d47b..a19c65333b 100644 --- a/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp +++ b/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp @@ -112,7 +112,6 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsDialog* dialog, QWidget* SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.PCRTCOverscan, "EmuCore/GS", "pcrtc_overscan", false); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.PCRTCAntiBlur, "EmuCore/GS", "pcrtc_antiblur", true); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.DisableInterlaceOffset, "EmuCore/GS", "disable_interlace_offset", false); - SettingWidgetBinder::BindWidgetToFloatSetting(sif, m_ui.zoom, "EmuCore/GS", "Zoom", 100.0f); SettingWidgetBinder::BindWidgetToFloatSetting(sif, m_ui.stretchY, "EmuCore/GS", "StretchY", 100.0f); SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.cropLeft, "EmuCore/GS", "CropLeft", 0); SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.cropTop, "EmuCore/GS", "CropTop", 0); @@ -357,11 +356,6 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsDialog* dialog, QWidget* dialog->registerWidgetHelp(m_ui.interlacing, tr("Deinterlacing"), tr("Automatic (Default)"), tr("")); - dialog->registerWidgetHelp(m_ui.zoom, tr("Zoom"), tr("100%"), - tr("Zoom = 100: Fit the entire image to the window without any cropping." - "Above/Below 100: Zoom In/Out." - "0: Automatic-Zoom-In until the black-bars are gone (Aspect ratio is kept, some of the image goes out of screen).")); - dialog->registerWidgetHelp(m_ui.stretchY, tr("Stretch Height"), tr("100%"), tr("")); dialog->registerWidgetHelp(m_ui.fullscreenModes, tr("Fullscreen Mode"), tr("Borderless Fullscreen"), tr("")); diff --git a/pcsx2-qt/Settings/GraphicsSettingsWidget.ui b/pcsx2-qt/Settings/GraphicsSettingsWidget.ui index faeaa17bc4..ef2f998170 100644 --- a/pcsx2-qt/Settings/GraphicsSettingsWidget.ui +++ b/pcsx2-qt/Settings/GraphicsSettingsWidget.ui @@ -201,34 +201,40 @@ - - + + - Zoom: + Bilinear Filtering: + + + + + + + + None + + + + + Bilinear (Smooth) + + + + + Bilinear (Sharp) + + + + + + + + Vertical Stretch: - - - % - - - 1 - - - 300 - - - - - - - Stretch Height: - - - - % @@ -241,14 +247,14 @@ - + Crop: - + @@ -320,7 +326,7 @@ - + @@ -383,32 +389,6 @@ - - - - Bilinear Filtering: - - - - - - - - None - - - - - Bilinear (Smooth) - - - - - Bilinear (Sharp) - - - - diff --git a/pcsx2/Config.h b/pcsx2/Config.h index 30572f1e0a..5be511ec5f 100644 --- a/pcsx2/Config.h +++ b/pcsx2/Config.h @@ -567,14 +567,8 @@ struct Pcsx2Config GSInterlaceMode InterlaceMode{GSInterlaceMode::Automatic}; GSPostBilinearMode LinearPresent{ GSPostBilinearMode::BilinearSmooth }; - float Zoom{100.0f}; float StretchY{100.0f}; -#ifndef PCSX2_CORE - float OffsetX{0.0f}; - float OffsetY{0.0f}; -#else int Crop[4]{}; -#endif float OsdScale{100.0}; diff --git a/pcsx2/Frontend/FullscreenUI.cpp b/pcsx2/Frontend/FullscreenUI.cpp index a28cf4ea3c..20b431d845 100644 --- a/pcsx2/Frontend/FullscreenUI.cpp +++ b/pcsx2/Frontend/FullscreenUI.cpp @@ -2838,8 +2838,6 @@ void FullscreenUI::DrawGraphicsSettingsPage() DrawIntListSetting(bsi, "Deinterlacing", "Selects the algorithm used to convert the PS2's interlaced output to progressive for display.", "EmuCore/GS", "deinterlace_mode", static_cast(GSInterlaceMode::Automatic), s_deinterlacing_options, std::size(s_deinterlacing_options)); - DrawIntRangeSetting(bsi, "Zoom", "Increases or decreases the virtual picture size both horizontally and vertically.", "EmuCore/GS", - "Zoom", 100, 10, 300, "%d%%"); DrawIntRangeSetting(bsi, "Vertical Stretch", "Increases or decreases the virtual picture size vertically.", "EmuCore/GS", "StretchY", 100, 10, 300, "%d%%"); DrawIntRectSetting(bsi, "Crop", "Crops the image, while respecting aspect ratio.", "EmuCore/GS", "CropLeft", 0, "CropTop", 0, diff --git a/pcsx2/GS/GS.cpp b/pcsx2/GS/GS.cpp index 427d8d5ad2..2a38c9d34f 100644 --- a/pcsx2/GS/GS.cpp +++ b/pcsx2/GS/GS.cpp @@ -1715,16 +1715,6 @@ static void HotkeyAdjustUpscaleMultiplier(s32 delta) GetMTGS().ApplySettings(); } -static void HotkeyAdjustZoom(double delta) -{ - const double new_zoom = std::clamp(EmuConfig.GS.Zoom + delta, 1.0, 200.0); - Host::AddKeyedFormattedOSDMessage("ZoomChanged", Host::OSD_QUICK_DURATION, "Zoom set to %.1f%%.", new_zoom); - EmuConfig.GS.Zoom = new_zoom; - - // no need to go through the full settings update for this - GetMTGS().RunOnGSThread([new_zoom]() { GSConfig.Zoom = new_zoom; }); -} - BEGIN_HOTKEY_LIST(g_gs_hotkeys) {"Screenshot", "Graphics", "Save Screenshot", [](s32 pressed) { if (!pressed) @@ -1810,14 +1800,6 @@ BEGIN_HOTKEY_LIST(g_gs_hotkeys) GetMTGS().RunOnGSThread([new_mode]() { GSConfig.InterlaceMode = new_mode; }); }}, - {"ZoomIn", "Graphics", "Zoom In", [](s32 pressed) { - if (!pressed) - HotkeyAdjustZoom(1.0); - }}, - {"ZoomOut", "Graphics", "Zoom Out", [](s32 pressed) { - if (!pressed) - HotkeyAdjustZoom(-1.0); - }}, {"ToggleTextureDumping", "Graphics", "Toggle Texture Dumping", [](s32 pressed) { if (!pressed) { diff --git a/pcsx2/GS/Renderers/Common/GSRenderer.cpp b/pcsx2/GS/Renderers/Common/GSRenderer.cpp index 105d4cccdf..3891734970 100644 --- a/pcsx2/GS/Renderers/Common/GSRenderer.cpp +++ b/pcsx2/GS/Renderers/Common/GSRenderer.cpp @@ -455,12 +455,7 @@ static GSVector4 CalculateDrawDstRect(s32 window_width, s32 window_height, const else if (arr > 1) target_height = std::floor(f_height / arr + 0.5f); - float zoom = GSConfig.Zoom / 100.0; - if (zoom == 0) //auto zoom in untill black-bars are gone (while keeping the aspect ratio). - zoom = std::max((float)arr, (float)(1.0 / arr)); - - target_width *= zoom; - target_height *= zoom * GSConfig.StretchY / 100.0f; + target_height *= GSConfig.StretchY / 100.0f; if (GSConfig.IntegerScaling) { @@ -524,12 +519,6 @@ static GSVector4 CalculateDrawDstRect(s32 window_width, s32 window_height, const } } -#ifndef PCSX2_CORE - const float unit = .01f * std::min(target_x, target_y); - target_x += unit * GSConfig.OffsetX; - target_y += unit * GSConfig.OffsetY; -#endif - GSVector4 ret(target_x, target_y, target_x + target_width, target_y + target_height); if (flip_y) diff --git a/pcsx2/Pcsx2Config.cpp b/pcsx2/Pcsx2Config.cpp index 45bc3f52ea..21ff9839c8 100644 --- a/pcsx2/Pcsx2Config.cpp +++ b/pcsx2/Pcsx2Config.cpp @@ -381,17 +381,11 @@ bool Pcsx2Config::GSOptions::OptionsAreEqual(const GSOptions& right) const OpEqu(InterlaceMode) && OpEqu(LinearPresent) && - OpEqu(Zoom) && OpEqu(StretchY) && -#ifndef PCSX2_CORE - OpEqu(OffsetX) && - OpEqu(OffsetY) && -#else OpEqu(Crop[0]) && OpEqu(Crop[1]) && OpEqu(Crop[2]) && OpEqu(Crop[3]) && -#endif OpEqu(OsdScale) && @@ -474,7 +468,6 @@ void Pcsx2Config::GSOptions::LoadSave(SettingsWrapper& wrap) SettingsWrapBitBool(SyncToHostRefreshRate); SettingsWrapEnumEx(AspectRatio, "AspectRatio", AspectRatioNames); SettingsWrapEnumEx(FMVAspectRatioSwitch, "FMVAspectRatioSwitch", FMVAspectRatioSwitchNames); - SettingsWrapEntry(Zoom); SettingsWrapEntry(StretchY); SettingsWrapEntryEx(Crop[0], "CropLeft"); SettingsWrapEntryEx(Crop[1], "CropTop"); diff --git a/pcsx2/gui/AppConfig.cpp b/pcsx2/gui/AppConfig.cpp index 98ce9cbb97..487d895a52 100644 --- a/pcsx2/gui/AppConfig.cpp +++ b/pcsx2/gui/AppConfig.cpp @@ -900,8 +900,6 @@ void AppConfig::GSWindowOptions::LoadSave(IniInterface& ini) NULL}; ini.EnumEntry(L"FMVAspectRatioSwitch", g_Conf->EmuOptions.GS.FMVAspectRatioSwitch, FMVAspectRatioSwitchNames, g_Conf->EmuOptions.GS.FMVAspectRatioSwitch); - ini.Entry(wxT("Zoom"), g_Conf->EmuOptions.GS.Zoom, g_Conf->EmuOptions.GS.Zoom); - if (ini.IsLoading()) SanityCheck(); } diff --git a/pcsx2/gui/GlobalCommands.cpp b/pcsx2/gui/GlobalCommands.cpp index 80b486bdaa..3824c5324e 100644 --- a/pcsx2/gui/GlobalCommands.cpp +++ b/pcsx2/gui/GlobalCommands.cpp @@ -161,44 +161,6 @@ namespace Implementations Host::AddKeyedFormattedOSDMessage("AspectRatio", 2.0f, "Aspect ratio: %s", arts); } - // NOTE: The settings below are super janky and race the GS thread when updating. - // But because they don't go through the proper settings update procedure, it's necessary to avoid reopening GS. - void SetOffset(float x, float y) - { - g_Conf->EmuOptions.GS.OffsetX = x; - g_Conf->EmuOptions.GS.OffsetY = y; - EmuConfig.GS.OffsetX = x; - EmuConfig.GS.OffsetY = y; - GSConfig.OffsetX = x; - GSConfig.OffsetY = y; - Host::AddKeyedFormattedOSDMessage("WindowOffset", 2.0f, "Offset: x=%f, y=%f", x, y); - } - - void GSwindow_OffsetYplus() - { - SetOffset(EmuConfig.GS.OffsetX, EmuConfig.GS.OffsetY + 1); - } - - void GSwindow_OffsetYminus() - { - SetOffset(EmuConfig.GS.OffsetX, EmuConfig.GS.OffsetY - 1); - } - - void GSwindow_OffsetXplus() - { - SetOffset(EmuConfig.GS.OffsetX + 1, EmuConfig.GS.OffsetY); - } - - void GSwindow_OffsetXminus() - { - SetOffset(EmuConfig.GS.OffsetX - 1, EmuConfig.GS.OffsetY); - } - - void GSwindow_OffsetReset() - { - SetOffset(0, 0); - } - void SetZoomY(float zoom) { if (zoom <= 0) @@ -222,49 +184,6 @@ namespace Implementations SetZoomY(100); } - void SetZoom(float zoom) - { - if (zoom < 0) - return; - g_Conf->EmuOptions.GS.Zoom = zoom; - EmuConfig.GS.Zoom = zoom; - GSConfig.Zoom = zoom; - - if (zoom == 0) - Host::AddKeyedOSDMessage("WindowZoom", "Zoom: 0 (auto, no black bars)"); - else - Host::AddKeyedFormattedOSDMessage("WindowZoom", 2.0f, "Zoom: %f", zoom); - } - - - void GSwindow_ZoomIn() - { - float z = EmuConfig.GS.Zoom; - if (z == 0) - z = 100; - z++; - SetZoom(z); - } - void GSwindow_ZoomOut() - { - float z = EmuConfig.GS.Zoom; - if (z == 0) - z = 100; - z--; - SetZoom(z); - } - void GSwindow_ZoomToggle() - { - float z = EmuConfig.GS.Zoom; - if (z == 100) - z = 0; - else - z = 100; - - SetZoom(z); - } - - void Sys_Suspend() { CoreThread.Suspend(); @@ -612,40 +531,10 @@ static const GlobalCommandDescriptor CommandDeclarations[] = true, }, - { - "GSwindow_ZoomIn", - Implementations::GSwindow_ZoomIn, - NULL, - NULL, - false, - }, - - { - "GSwindow_ZoomOut", - Implementations::GSwindow_ZoomOut, - NULL, - NULL, - false, - }, - - { - "GSwindow_ZoomToggle", - Implementations::GSwindow_ZoomToggle, - NULL, - NULL, - false, - }, - {"GSwindow_ZoomInY", Implementations::GSwindow_ZoomInY, NULL, NULL, false}, {"GSwindow_ZoomOutY", Implementations::GSwindow_ZoomOutY, NULL, NULL, false}, {"GSwindow_ZoomResetY", Implementations::GSwindow_ZoomResetY, NULL, NULL, false}, - {"GSwindow_OffsetYminus", Implementations::GSwindow_OffsetYminus, NULL, NULL, false}, - {"GSwindow_OffsetYplus", Implementations::GSwindow_OffsetYplus, NULL, NULL, false}, - {"GSwindow_OffsetXminus", Implementations::GSwindow_OffsetXminus, NULL, NULL, false}, - {"GSwindow_OffsetXplus", Implementations::GSwindow_OffsetXplus, NULL, NULL, false}, - {"GSwindow_OffsetReset", Implementations::GSwindow_OffsetReset, NULL, NULL, false}, - { "Sys_SuspendResume", Implementations::Sys_SuspendResume, diff --git a/pcsx2/gui/Panels/ConfigurationPanels.h b/pcsx2/gui/Panels/ConfigurationPanels.h index 41007448ee..463e8ec637 100644 --- a/pcsx2/gui/Panels/ConfigurationPanels.h +++ b/pcsx2/gui/Panels/ConfigurationPanels.h @@ -256,8 +256,6 @@ namespace Panels wxComboBox* m_combo_FMVAspectRatioSwitch; wxComboBox* m_combo_vsync; - wxTextCtrl* m_text_Zoom; - pxCheckBox* m_check_CloseGS; pxCheckBox* m_check_SizeLock; pxCheckBox* m_check_VsyncEnable; diff --git a/pcsx2/gui/Panels/GSWindowPanel.cpp b/pcsx2/gui/Panels/GSWindowPanel.cpp index 4fe472c329..f7fee0f7f2 100644 --- a/pcsx2/gui/Panels/GSWindowPanel.cpp +++ b/pcsx2/gui/Panels/GSWindowPanel.cpp @@ -51,8 +51,6 @@ Panels::GSWindowSettingsPanel::GSWindowSettingsPanel(wxWindow* parent) _("Adaptive"), }; - m_text_Zoom = CreateNumericalTextCtrl(this, 5); - m_combo_AspectRatio = new wxComboBox(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, std::size(aspect_ratio_labels), aspect_ratio_labels, wxCB_READONLY); @@ -80,14 +78,6 @@ Panels::GSWindowSettingsPanel::GSWindowSettingsPanel(wxWindow* parent) L"4:3: Temporarily switch to a 4:3 aspect ratio while an FMV plays to correctly display a 4:3 FMV. \n\n" L"16:9: Temporarily switch to a 16:9 aspect ratio while an FMV plays to correctly display a widescreen 16:9 FMV.")); - m_text_Zoom->SetToolTip(pxEt(L"Zoom = 100: Fit the entire image to the window without any cropping.\n" - L"Above/Below 100: Zoom In/Out.\n\n" - L"0: Automatic-Zoom-In until the black-bars are gone (Aspect ratio is kept, some of the image goes out of screen).\n\n" - L"NOTE: Some games draw their own black-bars, which will not be removed with '0'.\n\n" - L"Keyboard: \n" - L"CTRL + NUMPAD-PLUS: Zoom-In, \n" - L"CTRL + NUMPAD-MINUS: Zoom-Out, \nCTRL + NUMPAD-*: Toggle 100/0")); - m_combo_vsync->SetToolTip(pxEt(L"Vsync eliminates screen tearing but typically has a big performance hit. It usually only applies to fullscreen mode.")); m_check_HideMouse->SetToolTip(pxEt(L"Check this to force the mouse cursor invisible inside the GS window; useful if using the mouse as a primary control device for gaming. By default the mouse auto-hides after 2 seconds of inactivity.")); @@ -117,9 +107,6 @@ Panels::GSWindowSettingsPanel::GSWindowSettingsPanel(wxWindow* parent) s_AspectRatio += Label(_("Custom Window Size:")) | pxMiddle; s_AspectRatio += s_customsize | pxAlignRight; - s_AspectRatio += Label(_("Zoom:")) | pxMiddle; - s_AspectRatio += m_text_Zoom | pxAlignRight; - wxFlexGridSizer& s_vsync(*new wxFlexGridSizer(2, StdPadding, StdPadding)); s_vsync.AddGrowableCol(1); @@ -166,7 +153,6 @@ void Panels::GSWindowSettingsPanel::ApplyConfigToGui(AppConfig& configToApply, i m_combo_AspectRatio->SetSelection((int)gsconf.AspectRatio); m_combo_FMVAspectRatioSwitch->SetSelection(enum_cast(gsconf.FMVAspectRatioSwitch)); - m_text_Zoom->ChangeValue(wxString::FromDouble(gsconf.Zoom, 2)); m_check_DclickFullscreen->SetValue(conf.IsToggleFullscreenOnDoubleClick); @@ -192,10 +178,6 @@ void Panels::GSWindowSettingsPanel::Apply() gsconf.FMVAspectRatioSwitch = (FMVAspectRatioSwitchType)m_combo_FMVAspectRatioSwitch->GetSelection(); EmuConfig.CurrentAspectRatio = gsconf.AspectRatio; - double new_zoom = 0.0; - if (m_text_Zoom->GetValue().ToDouble(&new_zoom)) - gsconf.Zoom = new_zoom; - gsconf.VsyncEnable = static_cast(m_combo_vsync->GetSelection()); appconf.IsToggleFullscreenOnDoubleClick = m_check_DclickFullscreen->GetValue();