Skip to content

fix: hook GetRawInputData to block mouse clicks from reaching game through menu#959

Open
Abdelakil wants to merge 1 commit into
YimMenu:enhancedfrom
Abdelakil:pr/mouse-fix
Open

fix: hook GetRawInputData to block mouse clicks from reaching game through menu#959
Abdelakil wants to merge 1 commit into
YimMenu:enhancedfrom
Abdelakil:pr/mouse-fix

Conversation

@Abdelakil

Copy link
Copy Markdown

When YimMenuV2 is open and the user clicks on a menu option, the click also passes through to the game window because GTA V Enhanced reads mouse input via Raw Input (GetRawInputData), not WM_LBUTTONDOWN/WM_RBUTTONDOWN.

This hooks GetRawInputData and zeroes out mouse button flags when the menu is open, preventing the game from seeing clicks that ImGui has already consumed.

  • Adds src/game/hooks/GUI/RawInput.cpp — GetRawInputData hook
  • Registers the hook in Hooking.cpp
  • Declares the hook in Hooks.hpp

No behavioral changes when the menu is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant