internal Ps4Controller(SafeFileHandle read, HidPCaps caps) { _handleRead = read; _caps = caps; _fsRead = new FileStream(read, FileAccess.ReadWrite, _caps.InputReportByteLength, false); _readData = new byte[_caps.InputReportByteLength]; ReadAsync(); }
void Initialize(HidPreparsedData preparsedData) { capabilities = HidP.GetCaps(preparsedData); var buttonCaps = HidP.GetButtonCaps(preparsedData, HidPReportType.Input); ButtonSets = buttonCaps.Select(i => new HidButtonSet(this, i)).ToArray(); var valueCaps = HidP.GetValueCaps(preparsedData, HidPReportType.Input); ValueSets = valueCaps.Select(i => new HidValueSet(this, i)).ToArray(); }
public static extern NtStatus HidP_GetCaps(IntPtr pPreparsedData, out HidPCaps Capabilities);