From b9a3cbcfc006c8fb957f7dc7cbe8cb450adabb51 Mon Sep 17 00:00:00 2001 From: itsRevela Date: Sun, 22 Nov 2026 10:26:34 -0600 Subject: gameinput: GetTemporalReading stays E_NOTIMPL, as in GameInput v0 (RT-147) Microsoft's reference page says IGameInput::GetTemporalReading "was never implemented in v0" and returns E_NOTIMPL, and v1 removed it, so the shim's E_NOTIMPL already matches the API the title was built against. A history lookup would answer what no GameInput runtime does. The v0 header (NuGet Microsoft.GameInput 0.2303.22621.3038) declares (timestamp, device, reading), the shim's layout; the page's five-parameter form doesn't match it. Pin the behaviour in gameinput_test (E_NOTIMPL with the reading cleared, for past, present and current timestamps, with and without a device filter; E_POINTER for a null output) and say so in docs/gameinput.md instead of listing the method as a gap. --- runtime/test/gameinput_test.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'runtime/test/gameinput_test.cpp') diff --git a/runtime/test/gameinput_test.cpp b/runtime/test/gameinput_test.cpp index d1923ceaf..ba2a21f0e 100644 --- a/runtime/test/gameinput_test.cpp +++ b/runtime/test/gameinput_test.cpp @@ -992,6 +992,17 @@ int main() { check(input->GetPreviousReading(idle, GameInputKindGamepad, dev, nullptr) == E_POINTER && input->GetPreviousReading(nullptr, GameInputKindGamepad, dev, &hit) == E_INVALIDARG && !hit, "history: a null output is E_POINTER, a null reference E_INVALIDARG"); + // GetTemporalReading: E_NOTIMPL with a null reading, as GameInput v0 itself, for a timestamp in the history, one + // before it and the current time, with and without a device filter. + const uint64_t idle_us = idle->GetTimestamp(); + bool temporal_notimpl = true; + for (const uint64_t at : {idle_us, idle_us - 1'000'000, input->GetCurrentTimestamp()}) + for (IGameInputDevice* filter : {dev, static_cast(nullptr)}) { + IGameInputReading* temporal = idle; // a stale value the call must clear + temporal_notimpl &= input->GetTemporalReading(at, filter, &temporal) == E_NOTIMPL && !temporal; + } + check(temporal_notimpl && input->GetTemporalReading(idle_us, dev, nullptr) == E_POINTER, + "history: GetTemporalReading is E_NOTIMPL with a null reading, as in GameInput v0"); // Two pads in one stream, one poll each: A on the Xbox pad, B on the DualSense, Y on the Xbox pad. IGameInputReading* start = current(input, dev); -- cgit v1.2.3