From 8b476689eb16f12f91c0cb0541b27a394d6ec551 Mon Sep 17 00:00:00 2001 From: Hyper <34012267+hyperbx@users.noreply.github.com> Date: Sat, 19 Oct 2024 20:51:35 +0100 Subject: [PATCH] api: use MmGetHostAddress instead of g_memory.Translate --- UnleashedRecomp/api/SWA/System/ApplicationDocument.inl | 2 +- UnleashedRecomp/api/SWA/System/GameDocument.inl | 2 +- UnleashedRecomp/api/SWA/System/InputState.inl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/UnleashedRecomp/api/SWA/System/ApplicationDocument.inl b/UnleashedRecomp/api/SWA/System/ApplicationDocument.inl index 2177004..4e1652d 100644 --- a/UnleashedRecomp/api/SWA/System/ApplicationDocument.inl +++ b/UnleashedRecomp/api/SWA/System/ApplicationDocument.inl @@ -3,6 +3,6 @@ namespace SWA // TODO: Hedgehog::Base::TSynchronizedPtr inline CApplicationDocument* CApplicationDocument::GetInstance() { - return *(xpointer*)g_memory.Translate(0x833678A0); + return *(xpointer*)MmGetHostAddress(0x833678A0); } } diff --git a/UnleashedRecomp/api/SWA/System/GameDocument.inl b/UnleashedRecomp/api/SWA/System/GameDocument.inl index 0653376..c973a5c 100644 --- a/UnleashedRecomp/api/SWA/System/GameDocument.inl +++ b/UnleashedRecomp/api/SWA/System/GameDocument.inl @@ -3,6 +3,6 @@ namespace SWA // TODO: Hedgehog::Base::TSynchronizedPtr inline CGameDocument* CGameDocument::GetInstance() { - return *(xpointer*)g_memory.Translate(0x83367900); + return *(xpointer*)MmGetHostAddress(0x83367900); } } diff --git a/UnleashedRecomp/api/SWA/System/InputState.inl b/UnleashedRecomp/api/SWA/System/InputState.inl index 0e92a5e..5eba940 100644 --- a/UnleashedRecomp/api/SWA/System/InputState.inl +++ b/UnleashedRecomp/api/SWA/System/InputState.inl @@ -3,7 +3,7 @@ namespace SWA // TODO: Hedgehog::Base::TSynchronizedPtr inline CInputState* CInputState::GetInstance() { - return *(xpointer*)g_memory.Translate(0x833671EC); + return *(xpointer*)MmGetHostAddress(0x833671EC); } inline const SPadState& CInputState::GetPadState() const