CNA-BUG-237: Comments in Sdl3Platform.cpp and X11Platform.cpp refer to a Game::UpdateInput() that does not exist
Evidence basis: source-verified at the pinned commit; tests exist (not executed for this page). Claims on this page were checked by reading the CNA source at commit 009d40f5; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.
Both native backends explain their lazy controller-subsystem start by saying Game::UpdateInput() pumps the input services only once the subsystem is initialised, but Game has no UpdateInput(); the per-frame controller pump lives in Game::PollEvents.
- Identifier
CNA-BUG-237- Category
- Bug
- Subsystem
- Documentation & release tooling
- Status
- Open
- Verified against
- CNA
009d40f5(009d40f5dd085c4e674d3479675fac84b12b3e0a) - Severity
- Low (a triage suggestion, not a project priority)
- Evidence basis
- Source-verified: read at TARGET, not executed
- Tests touching this area
- Yes: see Current tests
- Affected contract
- Source comments in CNA::Platform::Sdl3::Sdl3Platform::EnsureControllerSubsystem and CNA::Platform::X11::X11Platform::EnsureControllerSubsystem
Expected behaviour
The comments explain a real and subtle rule -- the controller subsystem is started by the first controller query, not by the loop -- so they should name the function that actually pumps controllers each frame.
Actual behaviour at TARGET
Sdl3Platform.cpp says “Game::UpdateInput() deliberately does not reach these accessors until the subsystem is already initialized”, and X11Platform.cpp says “Game::UpdateInput() only pumps these services once the subsystem is initialised.” Game.cpp has no UpdateInput; the per-frame pump is in Game::PollEvents, guarded by IsSubsystemInitialized(PlatformSubsystem::Gamepad) before it reaches GetGamepad()/GetJoystick().
Source locations
modules/platform/src/Sdl3/Sdl3Platform.cpp— EnsureControllerSubsystem comment naming Game::UpdateInput()modules/platform/src/X11/X11Platform.cpp— EnsureControllerSubsystem comment naming Game::UpdateInput()modules/runtime/src/Game.cpp— Game::PollEvents holds the gamepad-gated pump; there is no Game::UpdateInput
Evidence
Checked by reading both backend comments and searching modules/runtime/src/Game.cpp for UpdateInput at 009d40f5 (it appears only in these two backend comments across the whole tree; Game::PollEvents holds the gate). Not executed.
Independent re-verification: Checked by reading both backend comments and Game::PollEvents in Game.cpp at 009d40f5; not executed. No Game::UpdateInput was ever declared or defined at any commit up to the target; the name entered with the commit and the plan_platform.md PLAT-83 row that introduced the gamepad-gated pump, and X11 copied it. Across the tree the name appears in those two source comments, in that PLAT-83 row (a third occurrence of the same misnaming, which the suggested comment fix would not touch) and, unrelated, in a design sketch in cnaplatform.md. Game::PollEvents holds the IsSubsystemInitialized(Gamepad) gate.
Focused reproduction
No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.
Current tests
Not applicable: comment-only defect. The lazy-start behaviour itself is exercised by the platform input suites.
Regression test
Replace Game::UpdateInput() with Game::PollEvents in both comments.
Blast radius
Maintainers of the Sdl3 and X11 controller paths who look for Game::UpdateInput. No runtime effect.
Workaround
No workaround is known.
Related pages
The same subject is explained at several altitudes. These are the neighbouring pages at each one.
- User guide
- Input: gamepad
- Maintainer workflow
- Modify a platform backend: read first
- Known issues
- Bug index