RemoteControlDevice.cs
changeset 66 3461ee6800e3
parent 49 2ec781e51f36
child 70 e0a7b35f90dd
     1.1 --- a/RemoteControlDevice.cs	Sun Feb 15 22:57:38 2015 +0100
     1.2 +++ b/RemoteControlDevice.cs	Sun Feb 15 23:06:54 2015 +0100
     1.3 @@ -5,7 +5,7 @@
     1.4  using System.Text;
     1.5  using Microsoft.Win32.SafeHandles;
     1.6  
     1.7 -using Hid.UsageTables;
     1.8 +using Hid.Usage;
     1.9  using Win32;
    1.10  
    1.11  
    1.12 @@ -183,31 +183,31 @@
    1.13  
    1.14              int i = 0;
    1.15              rid[i].usUsagePage = (ushort)Hid.UsagePage.WindowsMediaCenterRemoteControl;
    1.16 -            rid[i].usUsage = (ushort)Hid.UsageCollectionWindowsMediaCenter.WindowsMediaCenterRemoteControl;
    1.17 +            rid[i].usUsage = (ushort)Hid.UsageCollection.WindowsMediaCenter.WindowsMediaCenterRemoteControl;
    1.18              rid[i].dwFlags = Const.RIDEV_EXINPUTSINK;
    1.19              rid[i].hwndTarget = aHWND;
    1.20  
    1.21              i++;
    1.22              rid[i].usUsagePage = (ushort)Hid.UsagePage.Consumer;
    1.23 -            rid[i].usUsage = (ushort)Hid.UsageCollectionConsumer.ConsumerControl;
    1.24 +            rid[i].usUsage = (ushort)Hid.UsageCollection.Consumer.ConsumerControl;
    1.25              rid[i].dwFlags = Const.RIDEV_EXINPUTSINK;
    1.26              rid[i].hwndTarget = aHWND;
    1.27  
    1.28              i++;
    1.29              rid[i].usUsagePage = (ushort)Hid.UsagePage.Consumer;
    1.30 -            rid[i].usUsage = (ushort)Hid.UsageCollectionConsumer.Selection;
    1.31 +            rid[i].usUsage = (ushort)Hid.UsageCollection.Consumer.Selection;
    1.32              rid[i].dwFlags = Const.RIDEV_EXINPUTSINK;
    1.33              rid[i].hwndTarget = aHWND;
    1.34  
    1.35              i++;
    1.36              rid[i].usUsagePage = (ushort)Hid.UsagePage.GenericDesktopControls;
    1.37 -            rid[i].usUsage = (ushort)Hid.UsageCollectionGenericDesktop.SystemControl;
    1.38 +            rid[i].usUsage = (ushort)Hid.UsageCollection.GenericDesktop.SystemControl;
    1.39              rid[i].dwFlags = Const.RIDEV_EXINPUTSINK;
    1.40              rid[i].hwndTarget = aHWND;
    1.41  
    1.42  			//i++;
    1.43  			rid[i].usUsagePage = (ushort)Hid.UsagePage.GenericDesktopControls;
    1.44 -			rid[i].usUsage = (ushort)Hid.UsageCollectionGenericDesktop.GamePad;
    1.45 +			rid[i].usUsage = (ushort)Hid.UsageCollection.GenericDesktop.GamePad;
    1.46  			rid[i].dwFlags = Const.RIDEV_EXINPUTSINK;
    1.47  			rid[i].hwndTarget = aHWND;
    1.48  
    1.49 @@ -400,12 +400,12 @@
    1.50              HidUsageHandler usagePageHandler = null;
    1.51  
    1.52              //Check if this an MCE remote HID message
    1.53 -            if (aHidEvent.UsagePage == (ushort)Hid.UsagePage.WindowsMediaCenterRemoteControl && aHidEvent.UsageCollection == (ushort)Hid.UsageCollectionWindowsMediaCenter.WindowsMediaCenterRemoteControl)
    1.54 +            if (aHidEvent.UsagePage == (ushort)Hid.UsagePage.WindowsMediaCenterRemoteControl && aHidEvent.UsageCollection == (ushort)Hid.UsageCollection.WindowsMediaCenter.WindowsMediaCenterRemoteControl)
    1.55              {
    1.56                  usagePageHandler = HidMceRemoteHandler;
    1.57              }
    1.58              //Check if this is a consumer control HID message
    1.59 -            else if (aHidEvent.UsagePage == (ushort)Hid.UsagePage.Consumer && aHidEvent.UsageCollection == (ushort)Hid.UsageCollectionConsumer.ConsumerControl)
    1.60 +            else if (aHidEvent.UsagePage == (ushort)Hid.UsagePage.Consumer && aHidEvent.UsageCollection == (ushort)Hid.UsageCollection.Consumer.ConsumerControl)
    1.61              {
    1.62                  usagePageHandler = HidConsumerDeviceHandler;
    1.63              }