Skip to content

Fix an input update delay of one frame - #286

Merged
SimonDarksideJ merged 1 commit into
MonoGame:mainfrom
AlcxMtr:delayed-input-update-bug
Jul 31, 2026
Merged

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

Conversation

@AlcxMtr

@AlcxMtr AlcxMtr commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

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
@SimonDarksideJ
SimonDarksideJ merged commit be9d6b0 into MonoGame:main Jul 31, 2026
2 checks passed
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.

3 participants