diff --git a/UnleashedRecomp/api/SWA/HUD/Pause/HudPause.h b/UnleashedRecomp/api/SWA/HUD/Pause/HudPause.h index f4e6709..a93bf45 100644 --- a/UnleashedRecomp/api/SWA/HUD/Pause/HudPause.h +++ b/UnleashedRecomp/api/SWA/HUD/Pause/HudPause.h @@ -63,5 +63,7 @@ namespace SWA be m_Menu; be m_Status; be m_Transition; + SWA_INSERT_PADDING(0x20); + bool m_IsShown; }; } diff --git a/UnleashedRecomp/patches/ui/CHudPause_patches.cpp b/UnleashedRecomp/patches/ui/CHudPause_patches.cpp index 18225bb..9e57e6d 100644 --- a/UnleashedRecomp/patches/ui/CHudPause_patches.cpp +++ b/UnleashedRecomp/patches/ui/CHudPause_patches.cpp @@ -160,7 +160,9 @@ PPC_FUNC(sub_824B0930) { g_achievementMenuIntroTime = 0; - if (pHudPause->m_IsShown && pHudPause->m_Transition == SWA::eTransitionType_Undefined) + const auto ms_IsRenderHud = (bool*)g_memory.Translate(0x8328BB26); + + if (*ms_IsRenderHud && pHudPause->m_IsShown && pHudPause->m_Transition == SWA::eTransitionType_Undefined) { ButtonGuide::Open(Button(Localise("Achievements_Name"), EButtonIcon::Back, EButtonAlignment::Left, EFontQuality::Low)); g_isClosed = false;