From dab9e7aaa2fce6335eff08f9bd1e3d794ec0d4a8 Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Sun, 24 Sep 2023 00:32:38 +0100 Subject: [PATCH] GS/HW: Resize rect from half point in Double Half Clear --- pcsx2/GS/Renderers/HW/GSRendererHW.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp index 68660ec8f3027..c0bda25d2cc29 100644 --- a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp +++ b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp @@ -5823,12 +5823,16 @@ bool GSRendererHW::DetectDoubleHalfClear(bool& no_rt, bool& no_ds) // Double the clear rect. if (horizontal) { + const int width = m_r.width(); m_cached_ctx.FRAME.FBW *= 2; - m_r.z += m_r.x + m_r.width(); + m_r.z = (w_pages * frame_psm.pgs.x); + m_r.z += m_r.x + width; } else { - m_r.w += m_r.y + m_r.height(); + const int height = m_r.height(); + m_r.w = ((half - base) / m_cached_ctx.FRAME.FBW) * frame_psm.pgs.y; + m_r.w += m_r.y + height; } ReplaceVerticesWithSprite(m_r, GSVector2i(1, 1));