# HG changeset patch # User StephaneLenclud # Date 1425413264 -3600 # Node ID b27d6b8527e2058e1daa84f4ba586397f4a4966c # Parent bbe61b1021bb990f5e77651197caa9462fd35e8c Bunch of minor fixes, device list format. diff -r bbe61b1021bb -r b27d6b8527e2 HidDevice.cs --- a/HidDevice.cs Sun Feb 22 20:56:08 2015 +0100 +++ b/HidDevice.cs Tue Mar 03 21:07:44 2015 +0100 @@ -239,12 +239,12 @@ if (Product != null && Product.Length > 1) { - //Add the devices with a proper name at the top + //This device as a proper name, use it FriendlyName = Product + suffix; } else { - //Add other once at the bottom + //No proper name just use the device ID instead FriendlyName = "0x" + ProductId.ToString("X4") + suffix; } diff -r bbe61b1021bb -r b27d6b8527e2 RawInput.cs --- a/RawInput.cs Sun Feb 22 20:56:08 2015 +0100 +++ b/RawInput.cs Tue Mar 03 21:07:44 2015 +0100 @@ -189,7 +189,7 @@ else { //Add other once at the bottom - node = aTreeView.Nodes.Add(hidDevice.Name, "0x" + hidDevice.FriendlyName); + node = aTreeView.Nodes.Add(hidDevice.Name, hidDevice.FriendlyName); } node.Nodes.Add("Manufacturer: " + hidDevice.Manufacturer); diff -r bbe61b1021bb -r b27d6b8527e2 Win32Hid.cs --- a/Win32Hid.cs Sun Feb 22 20:56:08 2015 +0100 +++ b/Win32Hid.cs Tue Mar 03 21:07:44 2015 +0100 @@ -52,7 +52,7 @@ ///Report: PCHAR->CHAR* ///ReportLength: ULONG->unsigned int [System.Runtime.InteropServices.DllImportAttribute("hid.dll", EntryPoint = "HidP_GetUsageValue", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)] - public static extern int HidP_GetUsageValue(HIDP_REPORT_TYPE ReportType, ushort UsagePage, ushort LinkCollection, ushort Usage, ref uint UsageValue, System.IntPtr PreparsedData, System.IntPtr Report, uint ReportLength); + public static extern HidStatus HidP_GetUsageValue(HIDP_REPORT_TYPE ReportType, ushort UsagePage, ushort LinkCollection, ushort Usage, ref uint UsageValue, System.IntPtr PreparsedData, System.IntPtr Report, uint ReportLength);