From 8f96ec371e942673fc4c7afc77a206c7b8ce309d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 5 Apr 2023 09:32:39 +0200 Subject: [PATCH] Rename iBufFilter -> iDisplayFilter --- Core/Config.cpp | 2 +- Core/Config.h | 2 +- GPU/Common/FramebufferManagerCommon.cpp | 6 +++--- GPU/Software/SoftGpu.cpp | 2 +- Qt/mainwindow.cpp | 2 +- Qt/mainwindow.h | 2 +- UI/DisplayLayoutScreen.cpp | 2 +- Windows/MainWindowMenu.cpp | 14 +++++++------- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Core/Config.cpp b/Core/Config.cpp index 2aba48a42d..3d708ff4d0 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -838,7 +838,6 @@ static const ConfigSetting graphicsSettings[] = { ReportedConfigSetting("HardwareTransform", &g_Config.bHardwareTransform, true, true, true), ReportedConfigSetting("SoftwareSkinning", &g_Config.bSoftwareSkinning, true, true, true), ReportedConfigSetting("TextureFiltering", &g_Config.iTexFiltering, 1, true, true), - ReportedConfigSetting("BufferFiltering", &g_Config.iBufFilter, SCALE_LINEAR, true, true), ReportedConfigSetting("InternalResolution", &g_Config.iInternalResolution, &DefaultInternalResolution, true, true), ReportedConfigSetting("HighQualityDepth", &g_Config.bHighQualityDepth, true, true, true), ReportedConfigSetting("FrameSkip", &g_Config.iFrameSkip, 0, true, true), @@ -867,6 +866,7 @@ static const ConfigSetting graphicsSettings[] = { ConfigSetting("FullScreenMulti", &g_Config.bFullScreenMulti, false), #endif + ConfigSetting("BufferFiltering", &g_Config.iDisplayFilter, SCALE_LINEAR, true, true), ConfigSetting("DisplayOffsetX", &g_Config.fDisplayOffsetX, 0.5f, true, true), ConfigSetting("DisplayOffsetY", &g_Config.fDisplayOffsetY, 0.5f, true, true), ConfigSetting("DisplayScale", &g_Config.fDisplayScale, 1.0f, true, true), diff --git a/Core/Config.h b/Core/Config.h index e42a385f31..7e5620d96b 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -168,9 +168,9 @@ public: bool bSkipBufferEffects; int iTexFiltering; // 1 = auto , 2 = nearest , 3 = linear , 4 = auto max quality - int iBufFilter; // 1 = linear, 2 = nearest bool bDisplayStretch; // Automatically matches the aspect ratio of the window. + int iDisplayFilter; // 1 = linear, 2 = nearest float fDisplayOffsetX; float fDisplayOffsetY; float fDisplayScale; // Relative to the most constraining axis (x or y). diff --git a/GPU/Common/FramebufferManagerCommon.cpp b/GPU/Common/FramebufferManagerCommon.cpp index 60a7fd5a63..4d7ee44029 100644 --- a/GPU/Common/FramebufferManagerCommon.cpp +++ b/GPU/Common/FramebufferManagerCommon.cpp @@ -1188,7 +1188,7 @@ void FramebufferManagerCommon::DrawPixels(VirtualFramebuffer *vfb, int dstX, int // Should more of this be handled by the presentation engine? if (needBackBufferYSwap_) std::swap(v0, v1); - flags = g_Config.iBufFilter == SCALE_LINEAR ? DRAWTEX_LINEAR : DRAWTEX_NEAREST; + flags = g_Config.iDisplayFilter == SCALE_LINEAR ? DRAWTEX_LINEAR : DRAWTEX_NEAREST; flags = flags | DRAWTEX_TO_BACKBUFFER; FRect frame = GetScreenFrame(pixelWidth_, pixelHeight_); FRect rc; @@ -1434,7 +1434,7 @@ void FramebufferManagerCommon::DrawFramebufferToOutput(const u8 *srcPixels, int return; int uvRotation = useBufferedRendering_ ? g_Config.iInternalScreenRotation : ROTATION_LOCKED_HORIZONTAL; - OutputFlags flags = g_Config.iBufFilter == SCALE_LINEAR ? OutputFlags::LINEAR : OutputFlags::NEAREST; + OutputFlags flags = g_Config.iDisplayFilter == SCALE_LINEAR ? OutputFlags::LINEAR : OutputFlags::NEAREST; if (needBackBufferYSwap_) { flags |= OutputFlags::BACKBUFFER_FLIPPED; } @@ -1588,7 +1588,7 @@ void FramebufferManagerCommon::CopyDisplayToOutput(bool reallyDirty) { textureCache_->ForgetLastTexture(); int uvRotation = useBufferedRendering_ ? g_Config.iInternalScreenRotation : ROTATION_LOCKED_HORIZONTAL; - OutputFlags flags = g_Config.iBufFilter == SCALE_LINEAR ? OutputFlags::LINEAR : OutputFlags::NEAREST; + OutputFlags flags = g_Config.iDisplayFilter == SCALE_LINEAR ? OutputFlags::LINEAR : OutputFlags::NEAREST; if (needBackBufferYSwap_) { flags |= OutputFlags::BACKBUFFER_FLIPPED; } diff --git a/GPU/Software/SoftGpu.cpp b/GPU/Software/SoftGpu.cpp index 7fe082b859..a5cebc3198 100644 --- a/GPU/Software/SoftGpu.cpp +++ b/GPU/Software/SoftGpu.cpp @@ -562,7 +562,7 @@ void SoftGPU::CopyToCurrentFboFromDisplayRam(int srcwidth, int srcheight) { desc.tag = "SoftGPU"; bool hasImage = true; - OutputFlags outputFlags = g_Config.iBufFilter == SCALE_NEAREST ? OutputFlags::NEAREST : OutputFlags::LINEAR; + OutputFlags outputFlags = g_Config.iDisplayFilter == SCALE_NEAREST ? OutputFlags::NEAREST : OutputFlags::LINEAR; bool hasPostShader = presentation_ && presentation_->HasPostShader(); if (PSP_CoreParameter().compat.flags().DarkStalkersPresentHack && displayFormat_ == GE_FORMAT_5551 && g_DarkStalkerStretch != DSStretch::Off) { diff --git a/Qt/mainwindow.cpp b/Qt/mainwindow.cpp index 593fe5a0ec..64a9b4ead9 100644 --- a/Qt/mainwindow.cpp +++ b/Qt/mainwindow.cpp @@ -100,7 +100,7 @@ void MainWindow::updateMenus() updateMenuGroupInt(frameSkippingGroup, g_Config.iFrameSkip); updateMenuGroupInt(frameSkippingTypeGroup, g_Config.iFrameSkipType); updateMenuGroupInt(textureFilteringGroup, g_Config.iTexFiltering); - updateMenuGroupInt(screenScalingFilterGroup, g_Config.iBufFilter); + updateMenuGroupInt(screenScalingFilterGroup, g_Config.iDisplayFilter); updateMenuGroupInt(textureScalingLevelGroup, g_Config.iTexScalingLevel); updateMenuGroupInt(textureScalingTypeGroup, g_Config.iTexScalingType); diff --git a/Qt/mainwindow.h b/Qt/mainwindow.h index 6a492301d6..1123f6d570 100644 --- a/Qt/mainwindow.h +++ b/Qt/mainwindow.h @@ -140,7 +140,7 @@ private slots: void frameSkippingGroup_triggered(QAction *action) { g_Config.iFrameSkip = action->data().toInt(); } void frameSkippingTypeGroup_triggered(QAction *action) { g_Config.iFrameSkipType = action->data().toInt(); } void textureFilteringGroup_triggered(QAction *action) { g_Config.iTexFiltering = action->data().toInt(); } - void screenScalingFilterGroup_triggered(QAction *action) { g_Config.iBufFilter = action->data().toInt(); } + void screenScalingFilterGroup_triggered(QAction *action) { g_Config.iDisplayFilter = action->data().toInt(); } void textureScalingLevelGroup_triggered(QAction *action) { g_Config.iTexScalingLevel = action->data().toInt(); NativeMessageReceived("gpu_configChanged", ""); diff --git a/UI/DisplayLayoutScreen.cpp b/UI/DisplayLayoutScreen.cpp index 2f2c528286..6e5a68970c 100644 --- a/UI/DisplayLayoutScreen.cpp +++ b/UI/DisplayLayoutScreen.cpp @@ -302,7 +302,7 @@ void DisplayLayoutScreen::CreateViews() { if (!IsVREnabled()) { static const char *bufFilters[] = { "Linear", "Nearest", }; - leftColumn->Add(new PopupMultiChoice(&g_Config.iBufFilter, gr->T("Screen Scaling Filter"), bufFilters, 1, ARRAY_SIZE(bufFilters), gr->GetName(), screenManager())); + leftColumn->Add(new PopupMultiChoice(&g_Config.iDisplayFilter, gr->T("Screen Scaling Filter"), bufFilters, 1, ARRAY_SIZE(bufFilters), gr->GetName(), screenManager())); } Draw::DrawContext *draw = screenManager()->getDrawContext(); diff --git a/Windows/MainWindowMenu.cpp b/Windows/MainWindowMenu.cpp index 73e5046879..fbb85ed71c 100644 --- a/Windows/MainWindowMenu.cpp +++ b/Windows/MainWindowMenu.cpp @@ -845,8 +845,8 @@ namespace MainWindow { case ID_OPTIONS_LINEARFILTERING: g_Config.iTexFiltering = TEX_FILTER_FORCE_LINEAR; break; case ID_OPTIONS_AUTOMAXQUALITYFILTERING: g_Config.iTexFiltering = TEX_FILTER_AUTO_MAX_QUALITY; break; - case ID_OPTIONS_BUFLINEARFILTER: g_Config.iBufFilter = SCALE_LINEAR; break; - case ID_OPTIONS_BUFNEARESTFILTER: g_Config.iBufFilter = SCALE_NEAREST; break; + case ID_OPTIONS_BUFLINEARFILTER: g_Config.iDisplayFilter = SCALE_LINEAR; break; + case ID_OPTIONS_BUFNEARESTFILTER: g_Config.iDisplayFilter = SCALE_NEAREST; break; case ID_OPTIONS_TOPMOST: g_Config.bTopMost = !g_Config.bTopMost; @@ -1082,14 +1082,14 @@ namespace MainWindow { ID_OPTIONS_BUFLINEARFILTER, ID_OPTIONS_BUFNEARESTFILTER, }; - if (g_Config.iBufFilter < SCALE_LINEAR) - g_Config.iBufFilter = SCALE_LINEAR; + if (g_Config.iDisplayFilter < SCALE_LINEAR) + g_Config.iDisplayFilter = SCALE_LINEAR; - else if (g_Config.iBufFilter > SCALE_NEAREST) - g_Config.iBufFilter = SCALE_NEAREST; + else if (g_Config.iDisplayFilter > SCALE_NEAREST) + g_Config.iDisplayFilter = SCALE_NEAREST; for (int i = 0; i < ARRAY_SIZE(bufferfilteritems); i++) { - CheckMenuItem(menu, bufferfilteritems[i], MF_BYCOMMAND | ((i + 1) == g_Config.iBufFilter ? MF_CHECKED : MF_UNCHECKED)); + CheckMenuItem(menu, bufferfilteritems[i], MF_BYCOMMAND | ((i + 1) == g_Config.iDisplayFilter ? MF_CHECKED : MF_UNCHECKED)); } static const int frameskipping[] = {