This repository was archived by the owner on Mar 30, 2019. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork646
Commit4113896
committed
Update CustomDevice.cs
Hi guys,When a JoystickUpdate comes, the offset included there points to a field in the RawJoystickState struct. Sometimes, it's necessary to find what actual DeviceObjectInstance is related to that update.For that, it would be necessary to clall GetObjectInfo(offset, PropertyHowType.Byoffset), but GetObjectByInfo is internal in your implementation. You already give access to some overloads of it with GetObjectInfoByName, GetObjectInfoById, and GetObjectInfoByUsage, but it lacks the last one: GetObjectInfoByOffset, which is crucial to do that mapping.So, to achieve that, I have added the following method:public DeviceObjectInstance GetObjectInfoByOffset(int offset){return GetObjectInfo(offset, PropertyHowType.Byoffset);}Many thanks in advance, and congrats for your great great work.1 parent23bfaa5 commit4113896
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
109 | 114 | | |
110 | 115 | | |
111 | 116 | | |
| |||
246 | 251 | | |
247 | 252 | | |
248 | 253 | | |
249 | | - | |
| 254 | + | |
0 commit comments
Comments
(0)