[Win] Fixed RawHID struct definition

This commit is contained in:
Stefanos A 2014-01-17 19:11:05 +01:00 committed by thefiddler
parent 94476b930e
commit 956691de31

View file

@ -2758,7 +2758,23 @@ namespace OpenTK.Platform.Windows
/// <summary> /// <summary>
/// Raw input data as an array of bytes. /// Raw input data as an array of bytes.
/// </summary> /// </summary>
internal IntPtr RawData; internal byte RawData;
internal byte this[int index]
{
get
{
if (index < 0 || index > Size * Count)
throw new ArgumentOutOfRangeException("index");
unsafe
{
fixed (byte* data = &RawData)
{
return *(data + index);
}
}
}
}
} }
#endregion #endregion