From 36535dea70a4622f81de295d879efc1b6ce793b8 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Mon, 2 Oct 2023 22:58:05 -0700 Subject: [PATCH] Fix CGraphics::Render2D regswaps --- src/Kyoto/Graphics/DolphinCGraphics.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Kyoto/Graphics/DolphinCGraphics.cpp b/src/Kyoto/Graphics/DolphinCGraphics.cpp index d20a7ce2..74651cc4 100644 --- a/src/Kyoto/Graphics/DolphinCGraphics.cpp +++ b/src/Kyoto/Graphics/DolphinCGraphics.cpp @@ -817,10 +817,11 @@ void CGraphics::Render2D(const CTexture& tex, int x, int y, int w, int h, const MTXIdentity(mtx); GXLoadPosMtxImm(mtx, GX_PNMTX0); - float x1 = x - mViewport.mWidth / 2; - float y1 = y - mViewport.mHeight / 2; - float x2 = x1 + w; - float y2 = y1 + h; + float x2, y2, x1, y1; + x1 = x - mViewport.mWidth / 2; + y1 = y - mViewport.mHeight / 2; + x2 = x1 + w; + y2 = y1 + h; // Save state + setup CGX::SetVtxDescv(skPosColorTexDirect);