From 5627d91c17c645921de7d92c1e9f30f67a5ca9f3 Mon Sep 17 00:00:00 2001 From: lightningterror <18107717+lightningterror@users.noreply.github.com> Date: Tue, 7 Sep 2021 22:38:15 +0200 Subject: [PATCH] GS: Cleanup GSDevice a bit, use const when possible. --- pcsx2/GS/Renderers/Common/GSDevice.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pcsx2/GS/Renderers/Common/GSDevice.cpp b/pcsx2/GS/Renderers/Common/GSDevice.cpp index 8d960b1734..a404e39eb0 100644 --- a/pcsx2/GS/Renderers/Common/GSDevice.cpp +++ b/pcsx2/GS/Renderers/Common/GSDevice.cpp @@ -79,10 +79,10 @@ bool GSDevice::Reset(int w, int h) void GSDevice::Present(const GSVector4i& r, int shader) { - GSVector4i cr = m_wnd->GetClientRect(); + const GSVector4i cr = m_wnd->GetClientRect(); - int w = std::max(cr.width(), 1); - int h = std::max(cr.height(), 1); + const int w = std::max(cr.width(), 1); + const int h = std::max(cr.height(), 1); if (!m_backbuffer || m_backbuffer->GetWidth() != w || m_backbuffer->GetHeight() != h) { @@ -318,12 +318,12 @@ void GSDevice::Interlace(const GSVector2i& ds, int field, int mode, float yoffse void GSDevice::ExternalFX() { - GSVector2i s = m_current->GetSize(); + const GSVector2i s = m_current->GetSize(); if (ResizeTarget(&m_target_tmp)) { - GSVector4 sRect(0, 0, 1, 1); - GSVector4 dRect(0, 0, s.x, s.y); + const GSVector4 sRect(0, 0, 1, 1); + const GSVector4 dRect(0, 0, s.x, s.y); StretchRect(m_current, sRect, m_target_tmp, dRect, ShaderConvert_TRANSPARENCY_FILTER, false); DoExternalFX(m_target_tmp, m_current); @@ -332,12 +332,12 @@ void GSDevice::ExternalFX() void GSDevice::FXAA() { - GSVector2i s = m_current->GetSize(); + const GSVector2i s = m_current->GetSize(); if (ResizeTarget(&m_target_tmp)) { - GSVector4 sRect(0, 0, 1, 1); - GSVector4 dRect(0, 0, s.x, s.y); + const GSVector4 sRect(0, 0, 1, 1); + const GSVector4 dRect(0, 0, s.x, s.y); StretchRect(m_current, sRect, m_target_tmp, dRect, ShaderConvert_TRANSPARENCY_FILTER, false); DoFXAA(m_target_tmp, m_current); @@ -346,12 +346,12 @@ void GSDevice::FXAA() void GSDevice::ShadeBoost() { - GSVector2i s = m_current->GetSize(); + const GSVector2i s = m_current->GetSize(); if (ResizeTarget(&m_target_tmp)) { - GSVector4 sRect(0, 0, 1, 1); - GSVector4 dRect(0, 0, s.x, s.y); + const GSVector4 sRect(0, 0, 1, 1); + const GSVector4 dRect(0, 0, s.x, s.y); StretchRect(m_current, sRect, m_target_tmp, dRect, ShaderConvert_COPY, false); DoShadeBoost(m_target_tmp, m_current);