1.1 --- a/RemoteControlDevice.cs Sat Dec 06 23:34:02 2014 +0100
1.2 +++ b/RemoteControlDevice.cs Sun Dec 14 18:17:40 2014 +0100
1.3 @@ -84,7 +84,7 @@
1.4 {
1.5 RemoteControlButton _rcb;
1.6 InputDevice _device;
1.7 - MceButton iMceButton;
1.8 + WindowsMediaCenterRemoteControl iMceButton;
1.9 ConsumerControl iConsumerControl;
1.10
1.11 public RemoteControlEventArgs(RemoteControlButton rcb, InputDevice device)
1.12 @@ -104,7 +104,7 @@
1.13 }
1.14
1.15
1.16 - public RemoteControlEventArgs(MceButton mce, InputDevice device)
1.17 + public RemoteControlEventArgs(WindowsMediaCenterRemoteControl mce, InputDevice device)
1.18 {
1.19 SetNullButtons();
1.20 //
1.21 @@ -115,13 +115,13 @@
1.22 private void SetNullButtons()
1.23 {
1.24 iConsumerControl = ConsumerControl.Null;
1.25 - iMceButton = MceButton.Null;
1.26 + iMceButton = WindowsMediaCenterRemoteControl.Null;
1.27 _rcb = RemoteControlButton.Unknown;
1.28 }
1.29
1.30 public RemoteControlEventArgs()
1.31 {
1.32 - iMceButton = MceButton.Null;
1.33 + iMceButton = WindowsMediaCenterRemoteControl.Null;
1.34 _rcb = RemoteControlButton.Unknown;
1.35 _device = InputDevice.Key;
1.36 }
1.37 @@ -132,7 +132,7 @@
1.38 set { _rcb = value; }
1.39 }
1.40
1.41 - public MceButton MceButton
1.42 + public WindowsMediaCenterRemoteControl MceButton
1.43 {
1.44 get { return iMceButton; }
1.45 set { iMceButton = value; }
1.46 @@ -182,8 +182,8 @@
1.47 RAWINPUTDEVICE[] rid = new RAWINPUTDEVICE[4];
1.48
1.49 int i = 0;
1.50 - rid[i].usUsagePage = (ushort)Hid.UsagePage.MceRemote;
1.51 - rid[i].usUsage = (ushort)Hid.UsageIdMce.MceRemote;
1.52 + rid[i].usUsagePage = (ushort)Hid.UsagePage.WindowsMediaCenterRemoteControl;
1.53 + rid[i].usUsage = (ushort)Hid.UsageCollectionWindowsMediaCenter.WindowsMediaCenterRemoteControl;
1.54 rid[i].dwFlags = Const.RIDEV_EXINPUTSINK;
1.55 rid[i].hwndTarget = aHWND;
1.56
1.57 @@ -356,11 +356,11 @@
1.58 }
1.59
1.60
1.61 - if (Enum.IsDefined(typeof(MceButton), aUsage) && aUsage != 0) //Our button is a known MCE button
1.62 + if (Enum.IsDefined(typeof(WindowsMediaCenterRemoteControl), aUsage) && aUsage != 0) //Our button is a known MCE button
1.63 {
1.64 if (this.ButtonPressed != null)
1.65 {
1.66 - return this.ButtonPressed(this, new RemoteControlEventArgs((MceButton)aUsage, InputDevice.OEM));
1.67 + return this.ButtonPressed(this, new RemoteControlEventArgs((WindowsMediaCenterRemoteControl)aUsage, InputDevice.OEM));
1.68 }
1.69 return false;
1.70 }
1.71 @@ -394,7 +394,7 @@
1.72 HidUsageHandler usagePageHandler = null;
1.73
1.74 //Check if this an MCE remote HID message
1.75 - if (aHidEvent.UsagePage == (ushort)Hid.UsagePage.MceRemote && aHidEvent.UsageCollection == (ushort)Hid.UsageIdMce.MceRemote)
1.76 + if (aHidEvent.UsagePage == (ushort)Hid.UsagePage.WindowsMediaCenterRemoteControl && aHidEvent.UsageCollection == (ushort)Hid.UsageCollectionWindowsMediaCenter.WindowsMediaCenterRemoteControl)
1.77 {
1.78 usagePageHandler = HidMceRemoteHandler;
1.79 }