Skip to content

Commit

Permalink
Merge branch 'pr-2332'
Browse files Browse the repository at this point in the history
  • Loading branch information
nihonium committed Jan 19, 2024
2 parents 2212495 + a4c7c06 commit a57783c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions code/components/rage-input-five/src/InputHook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,17 @@ static HookFunction hookFunction([]()

// cancel out ioLogitechLedDevice
hook::jump(hook::get_pattern("85 C0 0F 85 ? ? 00 00 48 8B CB FF 15", -0x77), Return0);

// hook up cursor lock to CMousePointer::_bIsVisible
static auto isPointerVisible = hook::get_address<bool*>(hook::get_pattern("80 3D ? ? ? ? 00 0F 45 C6 88 05 ? ? ? ? 48 8B 5C", 10), 2, 6) + 2;

InputHook::QueryMayLockCursor.Connect([](int& may)
{
if (*isPointerVisible)
{
may = FALSE;
}
});
});

fwEvent<HWND, UINT, WPARAM, LPARAM, bool&, LRESULT&> InputHook::DeprecatedOnWndProc;
Expand Down

0 comments on commit a57783c

Please sign in to comment.