Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide PassThroughInputManager from input queue if parent input is disabled #6225

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

frenzibyte
Copy link
Member

@frenzibyte frenzibyte commented Mar 24, 2024

This resolves issue 1 pointed at ppy/osu#9658 (comment), and together with #6221, will resolve the issue entirely.

When the user presses the key to resume gameplay, ResumeOverlay enables the game input manager inside the key binding event handler.

In master, PassThroughInputManager is still included in the input queue even if UseParentInput is disabled, therefore, the game input manager will be next in line to handle the resumption key press, and since it's enabled by the ResumeOverlay before its turn comes to handle the event, it will end up handling it and incorrectly counting it as a game press (ResumeOverlay cannot block the key by returning true because it is nested in a pass-through input manager by itself).

With this PR, PassThroughInputManager will be hidden from the input queue if UseParentInput is disabled, therefore, even if ResumeOverlay enables the game input manager, the input manager will not be in the input queue to handle the key press.

Alternative path would be to schedule the resume operation in osu! so that the resumption key press event in the current frame passes all over the drawables in the input queue without the game input manger handling it, then have game input manager become enabled next frame.

Checked and made sure tests pass in here and in osu! as well.

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

Successfully merging this pull request may close these issues.

Resuming gameplay by clicking orange cursor can cause a hit on the underlying circle
1 participant