home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Support
General Support
Has MPTray been updated for Win7?
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="reverson1" data-source="post: 527050" data-attributes="member: 20748"><p>I found a couple things (sorry about the lack of formatting - I didn't see any options to format the code...)</p><p></p><p>1. I needed to add my device path to the list of paths that are checked in Device.cs</p><p></p><p> (deviceInterfaceDetailData.DevicePath.IndexOf("hid#irdevicev2") != -1)) //Microsoft RC6</p><p></p><p></p><p>2. In OnReadComplete in Remote.cs the code for _deviceStream.EndRead(AsyncResult) has changed from 13 to 25 and the index of the key has changed from 5 to 9.</p><p> </p><p></p><p> void OnReadComplete(IAsyncResult asyncResult)</p><p> {</p><p> try</p><p> {</p><p> int er = _deviceStream.EndRead(asyncResult);</p><p> if ((er == 13 || er == 25) && _deviceBuffer[1] == 1)</p><p> {</p><p> if (_deviceBuffer[5] == (int)_doubleClickButton && Environment.TickCount - _doubleClickTick <= _doubleClickTime)</p><p> {</p><p> if (DoubleClick != null)</p><p> DoubleClick(this, new RemoteEventArgs(_doubleClickButton));</p><p> }</p><p> else</p><p> {</p><p> if (er == 13)</p><p> {</p><p> _doubleClickButton = (RemoteButton)_deviceBuffer[5];</p><p> }</p><p> else</p><p> {</p><p> _doubleClickButton = (RemoteButton)_deviceBuffer[9];</p><p> }</p><p> _doubleClickTick = Environment.TickCount;</p><p></p><p> if (Click != null)</p><p> Click(this, new RemoteEventArgs(_doubleClickButton));</p><p> }</p><p> }</p><p></p><p> // begin another asynchronous read from the device</p><p> _deviceStream.BeginRead(_deviceBuffer, 0, _deviceBuffer.Length, new AsyncCallback(OnReadComplete), null);</p><p> }</p><p> catch { }</p><p> }</p><p></p><p>HTH</p></blockquote><p></p>
[QUOTE="reverson1, post: 527050, member: 20748"] I found a couple things (sorry about the lack of formatting - I didn't see any options to format the code...) 1. I needed to add my device path to the list of paths that are checked in Device.cs (deviceInterfaceDetailData.DevicePath.IndexOf("hid#irdevicev2") != -1)) //Microsoft RC6 2. In OnReadComplete in Remote.cs the code for _deviceStream.EndRead(AsyncResult) has changed from 13 to 25 and the index of the key has changed from 5 to 9. void OnReadComplete(IAsyncResult asyncResult) { try { int er = _deviceStream.EndRead(asyncResult); if ((er == 13 || er == 25) && _deviceBuffer[1] == 1) { if (_deviceBuffer[5] == (int)_doubleClickButton && Environment.TickCount - _doubleClickTick <= _doubleClickTime) { if (DoubleClick != null) DoubleClick(this, new RemoteEventArgs(_doubleClickButton)); } else { if (er == 13) { _doubleClickButton = (RemoteButton)_deviceBuffer[5]; } else { _doubleClickButton = (RemoteButton)_deviceBuffer[9]; } _doubleClickTick = Environment.TickCount; if (Click != null) Click(this, new RemoteEventArgs(_doubleClickButton)); } } // begin another asynchronous read from the device _deviceStream.BeginRead(_deviceBuffer, 0, _deviceBuffer.Length, new AsyncCallback(OnReadComplete), null); } catch { } } HTH [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
General Support
Has MPTray been updated for Win7?
Contact us
RSS
Top
Bottom