IGameInput::GetTemporalReading (v0)

注意

尚未实现此函数。

检索用于模拟某一特定时间设备状态的合成的 IGameInputReading 接口。

语法

HRESULT GetTemporalReading(  
         uint64_t timestamp,  
         IGameInputDevice* device,  
         IGameInputReading** reading  
)  

参数

timestamp _In_
类型:uint64_t

要模拟设备状态的目标时间。 指定时间的范围是过去 500 毫秒到将来 100 毫秒。

device _In_
类型:IGameInputDevice*

要预测指定时间的状态的设备。

reading _COM_Outptr_
类型:IGameInputReading**

返回的合成读取。

返回值

类型:HRESULT

返回 E_NOTIMPL

备注

对于过去的读取,GameInput API 只是在历史读取之间执行线性内插。 对于将来的读取,GameInput API 计算模拟输入的速度和加速度来预测其将来值。 因此,请求的读取相距将来越远,预测的准确性就会变得越低。 无法预测数字输入的状态,因此始终报告最近的状态。

对于临时读取,IGameInputReading 接口上的 GetInputKind 方法始终返回一个值,该值未设置 GameInputKindRawDeviceReport 标志。 同样,IGameInputReading 接口上的 GetRawReport 方法始终返回一个 NULL 指针(针对临时读取)。

GetTemporalReading 方法在无法返回某一读取时输出一个 NULL 指针并返回一个失败 HRESULT。 如果在输入流缓冲区中可用读取数据不足以准确内插或预测请求的时间戳处的设备状态,则可用发生此错误情况。 如果提供的时间戳处于过去的 500 ms 到将来的 100 ms 这个时间范围之外,也会出现此问题。

要求

头文件:GameInput.h

库:xgameruntime.lib

支持平台:Windows、Xbox One 系列主机和 Xbox Series 主机

另请参阅

高级 GameInput 主题
GameInput 概述
IGameInput