mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-10-30 07:11:05 +00:00
CHudPause_patches: fix achievements prompt appearing over PS3 loading
This commit is contained in:
parent
b7cee84bda
commit
8220f6772b
2 changed files with 12 additions and 1 deletions
|
|
@ -71,7 +71,8 @@ namespace SWA
|
||||||
boost::shared_ptr<Hedgehog::Mirage::CMatrixNode> m_spMatrixNodeRoot;
|
boost::shared_ptr<Hedgehog::Mirage::CMatrixNode> m_spMatrixNodeRoot;
|
||||||
SWA_INSERT_PADDING(0x14);
|
SWA_INSERT_PADDING(0x14);
|
||||||
CGammaController m_GammaController;
|
CGammaController m_GammaController;
|
||||||
SWA_INSERT_PADDING(0x1C);
|
boost::shared_ptr<CLoading> m_spLoading;
|
||||||
|
SWA_INSERT_PADDING(0x14);
|
||||||
boost::shared_ptr<Achievement::CManager> m_spAchievementManager;
|
boost::shared_ptr<Achievement::CManager> m_spAchievementManager;
|
||||||
boost::shared_ptr<CDatabaseTree> m_spDatabaseTree;
|
boost::shared_ptr<CDatabaseTree> m_spDatabaseTree;
|
||||||
Hedgehog::Base::CSharedString m_Field10C;
|
Hedgehog::Base::CSharedString m_Field10C;
|
||||||
|
|
@ -104,6 +105,7 @@ namespace SWA
|
||||||
SWA_ASSERT_OFFSETOF(CApplicationDocument::CMember, m_Field74, 0x74);
|
SWA_ASSERT_OFFSETOF(CApplicationDocument::CMember, m_Field74, 0x74);
|
||||||
SWA_ASSERT_OFFSETOF(CApplicationDocument::CMember, m_spMatrixNodeRoot, 0x84);
|
SWA_ASSERT_OFFSETOF(CApplicationDocument::CMember, m_spMatrixNodeRoot, 0x84);
|
||||||
SWA_ASSERT_OFFSETOF(CApplicationDocument::CMember, m_GammaController, 0xA0);
|
SWA_ASSERT_OFFSETOF(CApplicationDocument::CMember, m_GammaController, 0xA0);
|
||||||
|
SWA_ASSERT_OFFSETOF(CApplicationDocument::CMember, m_spLoading, 0xE0);
|
||||||
SWA_ASSERT_OFFSETOF(CApplicationDocument::CMember, m_spAchievementManager, 0xFC);
|
SWA_ASSERT_OFFSETOF(CApplicationDocument::CMember, m_spAchievementManager, 0xFC);
|
||||||
SWA_ASSERT_OFFSETOF(CApplicationDocument::CMember, m_spDatabaseTree, 0x104);
|
SWA_ASSERT_OFFSETOF(CApplicationDocument::CMember, m_spDatabaseTree, 0x104);
|
||||||
SWA_ASSERT_OFFSETOF(CApplicationDocument::CMember, m_Field10C, 0x10C);
|
SWA_ASSERT_OFFSETOF(CApplicationDocument::CMember, m_Field10C, 0x10C);
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,9 @@ void CHudPauseAddOptionsItemMidAsmHook(PPCRegister& pThis)
|
||||||
|
|
||||||
bool InjectMenuBehaviour(uint32_t pThis, uint32_t count)
|
bool InjectMenuBehaviour(uint32_t pThis, uint32_t count)
|
||||||
{
|
{
|
||||||
|
if (App::s_isLoading)
|
||||||
|
return true;
|
||||||
|
|
||||||
auto pHudPause = (SWA::CHudPause*)g_memory.Translate(pThis);
|
auto pHudPause = (SWA::CHudPause*)g_memory.Translate(pThis);
|
||||||
auto cursorIndex = *(be<uint32_t>*)g_memory.Translate(4 * (*(be<uint32_t>*)g_memory.Translate(pThis + 0x19C) + 0x68) + pThis);
|
auto cursorIndex = *(be<uint32_t>*)g_memory.Translate(4 * (*(be<uint32_t>*)g_memory.Translate(pThis + 0x19C) + 0x68) + pThis);
|
||||||
|
|
||||||
|
|
@ -116,6 +119,12 @@ bool CHudPauseMiscInjectOptionsMidAsmHook(PPCRegister& pThis)
|
||||||
PPC_FUNC_IMPL(__imp__sub_824B0930);
|
PPC_FUNC_IMPL(__imp__sub_824B0930);
|
||||||
PPC_FUNC(sub_824B0930)
|
PPC_FUNC(sub_824B0930)
|
||||||
{
|
{
|
||||||
|
if (App::s_isLoading)
|
||||||
|
{
|
||||||
|
__imp__sub_824B0930(ctx, base);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
auto pHudPause = (SWA::CHudPause*)g_memory.Translate(ctx.r3.u32);
|
auto pHudPause = (SWA::CHudPause*)g_memory.Translate(ctx.r3.u32);
|
||||||
auto pInputState = SWA::CInputState::GetInstance();
|
auto pInputState = SWA::CInputState::GetInstance();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue