From 411cb1ff98d20173fe5de5a62d5d787f4434b21d Mon Sep 17 00:00:00 2001 From: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com> Date: Sat, 4 Jan 2025 20:16:44 +0300 Subject: [PATCH] Use 4:3 as the base aspect ratio instead of 16:9. --- UnleashedRecomp/gpu/video.cpp | 6 +++--- UnleashedRecomp/patches/csd_patches.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/UnleashedRecomp/gpu/video.cpp b/UnleashedRecomp/gpu/video.cpp index b74a3ac9..f73cc302 100644 --- a/UnleashedRecomp/gpu/video.cpp +++ b/UnleashedRecomp/gpu/video.cpp @@ -1334,7 +1334,7 @@ static void CreateImGuiBackend() #endif } -static constexpr float ORIGINAL_ASPECT_RATIO = 16.0f / 9.0f; +static constexpr float ORIGINAL_ASPECT_RATIO = 4.0 / 3.0f; static void CheckSwapChain() { @@ -1360,8 +1360,8 @@ static void CheckSwapChain() } else { - g_backBuffer->width = 1280; - g_backBuffer->height = GameWindow::s_height * 1280 / GameWindow::s_width; + g_backBuffer->width = 960; + g_backBuffer->height = GameWindow::s_height * 960 / GameWindow::s_width; } } diff --git a/UnleashedRecomp/patches/csd_patches.cpp b/UnleashedRecomp/patches/csd_patches.cpp index 1e7d5fd4..049e223c 100644 --- a/UnleashedRecomp/patches/csd_patches.cpp +++ b/UnleashedRecomp/patches/csd_patches.cpp @@ -152,7 +152,7 @@ void MakeCsdProjectMidAsmHook(PPCRegister& r3, PPCRegister& r29) TraverseSceneNode(csdProject->m_pResource->pRootNode, name); } -static constexpr float ORIGINAL_ASPECT_RATIO = 16.0f / 9.0f; +static constexpr float ORIGINAL_ASPECT_RATIO = 4.0f / 3.0f; static float g_offsetX; static float g_offsetY; @@ -167,8 +167,8 @@ static void ComputeOffsets(float width, float height) } else { - g_offsetX = 0.0f; - g_offsetY = 0.5f * (1280.0f / aspectRatio - 720.0f); + g_offsetX = 0.5f * (960.0f - 1280.0f); // width is locked to 960 in video.cpp + g_offsetY = 0.5f * (960.0f / aspectRatio - 720.0f); } }