[Win] Fixed RawHID struct definition
authorStefanos A <stapostol@gmail.com>
Fri, 17 Jan 2014 18:11:05 +0000 (19:11 +0100)
committerthefiddler <stapostol@gmail.com>
Thu, 11 Sep 2014 10:51:46 +0000 (12:51 +0200)
Source/OpenTK/Platform/Windows/API.cs

index 57a8f29..41248c3 100644 (file)
@@ -2758,7 +2758,23 @@ namespace OpenTK.Platform.Windows
         /// <summary>
         /// Raw input data as an array of bytes.
         /// </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