From 9a25ddc14de7a5d52a028c50ce2fe6008b41049d Mon Sep 17 00:00:00 2001 From: Stefanos A Date: Sat, 18 Jan 2014 16:53:17 +0100 Subject: [PATCH] [Win] Corrected GetRawInputData invocation --- Source/OpenTK/Platform/Windows/WinRawInput.cs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/Source/OpenTK/Platform/Windows/WinRawInput.cs b/Source/OpenTK/Platform/Windows/WinRawInput.cs index d262e4b..69d1236 100644 --- a/Source/OpenTK/Platform/Windows/WinRawInput.cs +++ b/Source/OpenTK/Platform/Windows/WinRawInput.cs @@ -94,17 +94,10 @@ namespace OpenTK.Platform.Windows switch (message) { case WindowMessage.INPUT: - int size = 0; - -#if false - // Get the size of the input buffer - Functions.GetRawInputData(lParam, GetRawInputDataEnum.INPUT, - IntPtr.Zero, ref size, API.RawInputHeaderSize); - - void* data_ptr = stackalloc byte[size]; - RawInput* data = (RawInput*)data_ptr; -#endif + int size = BlittableValueType.Stride; RawInput data; + + //RawInput data; // Read the actual raw input structure if (size == Functions.GetRawInputData(lParam, GetRawInputDataEnum.INPUT, out data, ref size, API.RawInputHeaderSize)) -- 2.7.4