Skip to content

GameInput: implement IGameInput::GetTemporalReading (RT-147) - #2276

Closed
Koro4e wants to merge 1 commit into
ItsNotRexed:mainfrom
Koro4e:rt-147-gameinput-temporal
Closed

Koro4e wants to merge 1 commit into
ItsNotRexed:mainfrom
Koro4e:rt-147-gameinput-temporal

Conversation

@Koro4e

@Koro4e Koro4e commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Claimed on #2078: #2078 (comment)

What and why

IGameInput::GetTemporalReading is listed as not implemented in docs/gameinput.md: the shim answered E_NOTIMPL, so a title that asks for a reading at a past timestamp gets a failure today (RT-147). Microsoft publishes no reference page for this method (the next/previous-reading pages document only the history model), so the matching rule is chosen and recorded: the reading nearest in time to the requested timestamp, from the one device's history.

The v0 GameInput.h header (the NuGet package's native/include/v0) marks the device parameter _In_ — required, unlike the _In_opt_ device of GetCurrentReading/GetNextReading/GetPreviousReading — and there is no kind filter, so a null device is E_INVALIDARG. Everything else follows the shim's existing conventions and the documented history model: a timestamp older than the oldest buffered reading asks for a reading that has left the half-second stream and fails with GAMEINPUT_E_REFERENCE_READING_TOO_OLD, the same left-the-stream failure the next/previous pages describe; a disconnected device reports GAMEINPUT_E_DEVICE_DISCONNECTED; a future timestamp returns the newest reading, which is the nearest one there is.

docs/gameinput.md moves the method to the implemented column, adds the temporal rows to the HRESULT table and flags the nearest-in-time rule as this shim's choice in the VERIFY section.

How checked

Windows 11 26200.9457, MSVC 14.44 (VS 2022 BuildTools); no GPU needed for this one.

  • gameinput_test (SDL virtual joysticks, no hardware pad): new cases pin the exact-timestamp match, the between-readings midpoint (older wins on a tie), the future clamp to the newest reading, the too-old refusal, the E_POINTER/E_INVALIDARG null cases and that only the given device is searched.
  • The rest of gameinput_test passes unchanged.

Notes

  • The nearest-in-time rule (rather than at-or-before) and the future clamp are choices, not measurements — Microsoft's own method page is not public. Flagged as such in docs/gameinput.md's VERIFY section.
  • Depends on: none (based on main at 4eb6155).

AI-assisted: yes

The shim answered E_NOTIMPL, so a title asking for a reading at a past
timestamp got a failure. The v0 GameInput.h header takes the device as
required (_In_, unlike the _In_opt_ device of its neighbours) and has no kind
filter, so the search covers the one device's history: the reading nearest in
time to the given timestamp (on a tie the older reading; a future timestamp
returns the newest reading, which is the nearest there is). A timestamp older
than the oldest buffered reading asks for one that has left the half-second
stream, the same left-the-stream failure a too-old reference gets in
GetNext/GetPrevious (REFERENCE_READING_TOO_OLD); an empty history and a
disconnected device fail the way GetCurrentReading and the kind lookups do.

Microsoft publishes no page for this method, so the nearest-in-time rule is
the shim's choice, recorded in docs/gameinput.md alongside the existing
HRESULT table (the method moves to the implemented column). gameinput_test
pins the exact-timestamp match, the between-readings midpoint, the future
clamp, the too-old refusal, the null output and null device cases and the
single-device search.

AI-assisted: yes
@Dom-in

Dom-in commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Windows + GPU check: AMD Radeon RX 9070 (RDNA4), Windows 11, MSVC Release, Vulkan SDK 1.4.363. Tested head 6555312 merged onto main 4947579 (clean merge), full build, full ctest -C Release -j 4: 100% tests passed out of 107 | new failures vs main: none. The main baseline on the same machine passes 107/107, so nothing regresses here.

AI-assisted (Claude Code); runs on my machine.

@JRamos1993

Copy link
Copy Markdown
Contributor

Tested 6555312, merged onto main 4947579 (no conflicts), on an RTX 5090 (driver 616.92), Windows 11, MSVC 19.44, Vulkan SDK 1.4.363, fresh RelWithDebInfo build, SDL3 3.4.20 (fetched), no pad attached:

  • gameinput: passes 20 of 20 runs.
  • Full ctest: 125/125. No new /W4 warnings.

AI-assisted (Claude Code).

@Dom-in

Dom-in commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Windows + GPU check: AMD Radeon RX 9070 (RDNA4), Windows 11, MSVC Release, Vulkan SDK 1.4.363. Tested head 6555312 merged onto main 4947579 (clean merge), full build, full ctest -C Release -j 4: 100% tests passed out of 116 | new failures vs main: none. The main baseline on the same machine passes 116/116, so nothing regresses here.

AI-assisted (Claude Code); runs on my machine.

@ItsNotRexed

Copy link
Copy Markdown
Owner

Closing: #2239 (RT-147) merged first and deliberately keeps IGameInput::GetTemporalReading at E_NOTIMPL, as GameInput v0 does (see docs/gameinput.md). If you have evidence the game needs it implemented, please open an issue with it.

@marquezinii

Copy link
Copy Markdown
Contributor

Tested 6555312 on RTX 5070, driver 621.24, Windows 11 26H2 (26300), MSVC 14.52 (VS Build Tools 18), RelWithDebInfo, with VK_LAYER_KHRONOS_validation on (LEONIDA_VK_VALIDATION=1): pass once merged with current main. This branch is based on 4eb6155, where d3d12_draw already fails on this machine without the PR. Merged locally with main 4947579 (no conflicts, d8f0b28a), full ctest is 116/116.

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.

5 participants