Skip to content

Fix lost key/mouse events and scroll accumulation within a frame (#847) - #854

Merged
adriengivry merged 3 commits into
Overload-Technologies:mainfrom
Element119rd:fix/lost-inputs-847
Sep 20, 2026
Merged

adriengivry merged 3 commits into
Overload-Technologies:mainfrom
Element119rd:fix/lost-inputs-847

Conversation

@Element119rd

Copy link
Copy Markdown
Contributor

Description

Fixes the input handling bug reported in #847, where clicks, key presses, and mouse wheel notches get lost within a single frame.

Changes

-- Replaced single state event maps in InputManager with separate per-frame flag maps (m_keyPressed, m_keyReleased, m_mouseButtonPressed, m_mouseButtonReleased).
-- Changed OnMouseScroll to accumulate deltas (+=) instead of overwriting.
-- Updated ClearEvents() to reset scroll vector and clear frame flags.
-- Kept public API signature unchanged.

Related Issue(s)

Fixes #847

Review Guidance

Main changes are in InputManager.cpp / .h.
ClearEvents() logic remains tied to the end-of-frame tick,

How to test

  1. Build the project.
  2. Add the repro script from the issue to any actor, press Play.
  3. Tap quickly on a touchpad a few times , each tap should log both Left button down and Left button up.
  4. Spin the mouse wheel fast , logged scroll values should reflect the sum of notches received during the frame,
  5. verify normal held keys/buttons still behave correctly.

Screenshots/GIFs

none!

AI Usage Disclosure

none!

Checklist

  • My code follows the project's code style guidelines
  • When applicable, I have commented my code, particularly in hard-to-understand areas
  • When applicable, I have updated the documentation accordingly
  • My changes don't generate new warnings or errors
  • I have reviewed and take responsibility for all code in this PR (including any AI-assisted contributions)

Comment thread Sources/OvWindowing/include/OvWindowing/Inputs/InputManager.h Outdated
Comment thread Sources/OvWindowing/include/OvWindowing/Inputs/InputManager.h Outdated
Comment thread Sources/OvWindowing/src/OvWindowing/Inputs/InputManager.cpp Outdated
@adriengivry
adriengivry merged commit 33e264c into Overload-Technologies:main Sep 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Clicks, key presses and wheel notches get lost within a frame

2 participants