DS4Api.DS4.RecieveRaw C# (CSharp) Method

RecieveRaw() public static method

public static RecieveRaw ( IntPtr hidapi_handle, byte buf ) : int
hidapi_handle System.IntPtr
buf byte
return int
        public static int RecieveRaw(IntPtr hidapi_handle, byte[] buf)
        {
            if (hidapi_handle == IntPtr.Zero) return -2;

            HIDapi.hid_set_nonblocking(hidapi_handle, 1);
            int res = HIDapi.hid_read(hidapi_handle, buf, new UIntPtr(Convert.ToUInt32(buf.Length)));

            return res;
        }