Skip to content

Fix an input update delay of one frame - #286

Open
AlcxMtr wants to merge 1 commit into
MonoGame:mainfrom
AlcxMtr:delayed-input-update-bug
Open

Fix an input update delay of one frame#286
AlcxMtr wants to merge 1 commit into
MonoGame:mainfrom
AlcxMtr:delayed-input-update-bug

Conversation

@AlcxMtr

@AlcxMtr AlcxMtr commented Jul 27, 2026

Copy link
Copy Markdown

Previously, CheckKeyboardInput() and CheckGamePadInput() were called before the call to base.Update(), resulting in the use of stale input data. This sequence results in stale input data because the base.Update() call is where InputManager is updated with fresh input data, and because the "CheckInput" methods get their information from the InputManager. The corresponding fix simply moved the update ahead of the checker methods.

Previously, CheckKeyboardInput() and CheckGamePadInput() were called
before the call to base.Update(), resulting in stale input data. This
sequence results in stale input data because the base.Update() call is
where InputManager is updated with fresh input data, and because the
"CheckInput" methods get their information from the InputManager. The
corresponding fix simply moved the update ahead of the checker methods.
@AlcxMtr AlcxMtr changed the title Fix an input updates delay of one frame Fix an input update delay of one frame Jul 27, 2026
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