IGameInput::GetTemporalReading
Note
This function is not yet implemented.
Retrieves a synthesized IGameInputReading interface that simulates a device state at a specific time.
Syntax
HRESULT GetTemporalReading(
uint64_t timestamp,
IGameInputDevice* device,
IGameInputReading** reading
)
Parameters
timestamp _In_
Type: uint64_t
Target time to simulate a device state. The designated time is in the range of 500 ms in the past to 100 ms in the future.
device _In_
Type: IGameInputDevice*
The device to predict the state of at the designated time.
reading _COM_Outptr_
Type: IGameInputReading**
The returned synthesized reading.
Return value
Type: HRESULT
Returns E_NOTIMPL
.
Remarks
For readings in the past, the GameInput API simply performs linear interpolation between historical readings. For readings in the future, the GameInput API computes the velocity and acceleration of analog inputs to predict their future values. As a result, the farther into the future the requested reading is, the less accurate the prediction becomes. The state of digital inputs cannot be predicted, so the most current state is always reported.
For temporal readings, the GetInputKind method on the IGameInputReading
interface always returns a value that does not have the GameInputKindRawDeviceReport
flag set. Likewise, the GetRawReport method on the IGameInputReading
interface always returns a NULL
pointer (for temporal readings).
The GetTemporalReading
method outputs a NULL
pointer and returns a failure HRESULT
if it is unable to return a reading. This can happen if insufficient reading data is available in the input stream buffer to accurately interpolate or predict the device's state at the requested timestamp. This also happens if the provided timestamp is more than 500 ms in the past or more than 100 ms in the future.
Requirements
Header: GameInput.h
Library: xgameruntime.lib
Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles