mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-27 21:01:37 +00:00
Fix input state mapping.
This commit is contained in:
parent
57fe789903
commit
6f31815f7d
3 changed files with 4 additions and 10 deletions
|
|
@ -11,10 +11,9 @@ namespace SWA
|
|||
// TODO: Hedgehog::Base::TSynchronizedPtr<CInputState>
|
||||
static CInputState* GetInstance();
|
||||
|
||||
SPadState m_PadStates[40];
|
||||
SWA_INSERT_PADDING(0x50);
|
||||
SWA_INSERT_PADDING(0x4);
|
||||
SPadState m_PadStates[8];
|
||||
be<uint32_t> m_CurrentPadStateIndex;
|
||||
SWA_INSERT_PADDING(0x04);
|
||||
|
||||
const SPadState& GetPadState() const;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ namespace SWA
|
|||
// TODO: Hedgehog::Base::TSynchronizedPtr<CInputState>
|
||||
inline CInputState* CInputState::GetInstance()
|
||||
{
|
||||
return *(xpointer<CInputState>*)MmGetHostAddress(0x833671EC);
|
||||
return *(xpointer<CInputState>*)MmGetHostAddress(0x83361F5C);
|
||||
}
|
||||
|
||||
inline const SPadState& CInputState::GetPadState() const
|
||||
|
|
|
|||
|
|
@ -43,16 +43,11 @@ namespace SWA
|
|||
|
||||
struct SPadState
|
||||
{
|
||||
SWA_INSERT_PADDING(0x20);
|
||||
|
||||
be<uint32_t> DownState;
|
||||
be<uint32_t> UpState;
|
||||
be<uint32_t> TappedState;
|
||||
be<uint32_t> ReleasedState;
|
||||
|
||||
// TODO: This structure seems different than the Generations counterpart,
|
||||
// these paddings might not be there.
|
||||
|
||||
be<float> LeftStickHorizontal;
|
||||
be<float> LeftStickVertical;
|
||||
|
||||
|
|
@ -66,7 +61,7 @@ namespace SWA
|
|||
be<float> LeftTrigger;
|
||||
be<float> RightTrigger;
|
||||
|
||||
SWA_INSERT_PADDING(0x24);
|
||||
SWA_INSERT_PADDING(0x08);
|
||||
|
||||
bool IsDown(const EKeyState in_Keys) const;
|
||||
bool IsUp(const EKeyState in_Keys) const;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue