From 1f77e7d90a8a28edae9b9e01894a209fa503b2de Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Sat, 12 Aug 2023 19:33:46 +0100 Subject: [PATCH] GS/CRC: Fix the sizing on Sonic Unleashed copy CRC --- pcsx2/GS/Renderers/HW/GSHwHack.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pcsx2/GS/Renderers/HW/GSHwHack.cpp b/pcsx2/GS/Renderers/HW/GSHwHack.cpp index 5f77cfb1e3..4facbd384d 100644 --- a/pcsx2/GS/Renderers/HW/GSHwHack.cpp +++ b/pcsx2/GS/Renderers/HW/GSHwHack.cpp @@ -1059,9 +1059,11 @@ bool GSHwHack::OI_SonicUnleashed(GSRendererHW& r, GSTexture* rt, GSTexture* ds, GSTextureCache::Target* rt_again = g_texture_cache->LookupTarget(Frame, src_size, src->m_scale, GSTextureCache::RenderTarget); if (rt_again->m_unscaled_size.x < src->m_unscaled_size.x || rt_again->m_unscaled_size.y < src->m_unscaled_size.y) { - rt_again->ResizeTexture(std::max(rt_again->m_unscaled_size.x, src->m_unscaled_size.x), - std::max(rt_again->m_unscaled_size.y, src->m_unscaled_size.y)); + GSVector2i new_size = GSVector2i(std::max(rt_again->m_unscaled_size.x, src->m_unscaled_size.x), + std::max(rt_again->m_unscaled_size.y, src->m_unscaled_size.y)); + rt_again->ResizeTexture(new_size.x, new_size.y); rt = rt_again->m_texture; + rt_size = new_size; } }