Merge pull request #240 from XLabsProject/fix-gamepad

[Gamepad] Fix hook conflitcs
This commit is contained in:
Edo 2022-05-03 17:05:14 +01:00 committed by GitHub
commit 9f574be237
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 2110 additions and 2111 deletions

View File

@ -1531,11 +1531,9 @@ namespace Components
gpad_present.setRaw(gpadPresent);
}
void Gamepad::IN_Frame_Hk()
{
// Call original method
Utils::Hook::Call<void()>(0x64C490)();
RawMouse::IN_MouseMove();
IN_GamePadsMove();
}

View File

@ -146,7 +146,6 @@ namespace Components
{
Utils::Hook(0x475E65, RawMouse::IN_MouseMove, HOOK_JUMP).install()->quick();
Utils::Hook(0x475E8D, RawMouse::IN_MouseMove, HOOK_JUMP).install()->quick();
Utils::Hook(0x475E9E, RawMouse::IN_MouseMove, HOOK_JUMP).install()->quick();
Utils::Hook(0x467C03, RawMouse::IN_Init, HOOK_CALL).install()->quick();
Utils::Hook(0x64D095, RawMouse::IN_Init, HOOK_JUMP).install()->quick();

View File

@ -6,6 +6,9 @@ namespace Components
{
public:
RawMouse();
static void IN_MouseMove();
private:
static Dvar::Var M_RawInput;
static int MouseRawX, MouseRawY;
@ -15,6 +18,5 @@ namespace Components
static void IN_RawMouseMove();
static void IN_RawMouse_Init();
static void IN_Init();
static void IN_MouseMove();
};
}