From 3ffa80766731616bd5918120bde58da8fbf61d1a Mon Sep 17 00:00:00 2001 From: Hyper <34012267+hyperbx@users.noreply.github.com> Date: Wed, 4 Dec 2024 22:57:15 +0000 Subject: [PATCH] CTitleStateMenu: fix start button opening old options menu --- UnleashedRecomp/patches/ui/CTitleStateMenu_patches.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/UnleashedRecomp/patches/ui/CTitleStateMenu_patches.cpp b/UnleashedRecomp/patches/ui/CTitleStateMenu_patches.cpp index 71225b30..dfb4338f 100644 --- a/UnleashedRecomp/patches/ui/CTitleStateMenu_patches.cpp +++ b/UnleashedRecomp/patches/ui/CTitleStateMenu_patches.cpp @@ -9,11 +9,12 @@ PPC_FUNC(sub_825882B8) { auto pTitleState = (SWA::CTitleStateBase*)g_memory.Translate(ctx.r3.u32); auto pInputState = SWA::CInputState::GetInstance(); + auto& pPadState = pInputState->GetPadState(); auto isOptionsIndex = pTitleState->m_pMember->m_pTitleMenu->m_CursorIndex == 2; if (!OptionsMenu::s_isVisible && pInputState && isOptionsIndex) { - if (pInputState->GetPadState().IsTapped(SWA::eKeyState_A)) + if (pPadState.IsTapped(SWA::eKeyState_A) || pPadState.IsTapped(SWA::eKeyState_Start)) { Game_PlaySound("sys_worldmap_window"); Game_PlaySound("sys_worldmap_decide"); @@ -27,7 +28,7 @@ PPC_FUNC(sub_825882B8) if (pInputState && isOptionsIndex) { - if (OptionsMenu::CanClose() && pInputState->GetPadState().IsTapped(SWA::eKeyState_B)) + if (OptionsMenu::CanClose() && pPadState.IsTapped(SWA::eKeyState_B)) { Game_PlaySound("sys_worldmap_cansel");