Skip to content

Commit d1fe0bf

Browse files
committed
Add input handle acquisition for new tracker roles
1 parent 25fe225 commit d1fe0bf

3 files changed

Lines changed: 18 additions & 13 deletions

File tree

OpenVR2Key/MainController.cs

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class MainController
3535
// Other
3636
private string _currentApplicationId = "";
3737
private ulong _inputSourceHandleLeft = 0, _inputSourceHandleRight = 0;
38-
private ulong[] _inputSourceHandles = new ulong[10];
38+
private ulong[] _inputSourceHandles = new ulong[14];
3939
private ulong _notificationOverlayHandle = 0;
4040
private string[] _actionKeys = new string[0];
4141

@@ -222,16 +222,21 @@ private void UpdateInputSourceHandles()
222222
{
223223
_inputSourceHandleLeft = _ovr.GetInputSourceHandle(EasyOpenVRSingleton.InputSource.LeftHand);
224224
_inputSourceHandleRight = _ovr.GetInputSourceHandle(EasyOpenVRSingleton.InputSource.RightHand);
225-
_inputSourceHandles[0] = _inputSourceHandleLeft;
226-
_inputSourceHandles[1] = _inputSourceHandleRight;
227-
_inputSourceHandles[2] = _ovr.GetInputSourceHandle(EasyOpenVRSingleton.InputSource.Chest);
228-
_inputSourceHandles[3] = _ovr.GetInputSourceHandle(EasyOpenVRSingleton.InputSource.LeftElbow);
229-
_inputSourceHandles[4] = _ovr.GetInputSourceHandle(EasyOpenVRSingleton.InputSource.LeftKnee);
230-
_inputSourceHandles[5] = _ovr.GetInputSourceHandle(EasyOpenVRSingleton.InputSource.LeftFoot);
231-
_inputSourceHandles[6] = _ovr.GetInputSourceHandle(EasyOpenVRSingleton.InputSource.RightElbow);
232-
_inputSourceHandles[7] = _ovr.GetInputSourceHandle(EasyOpenVRSingleton.InputSource.RightKnee);
233-
_inputSourceHandles[8] = _ovr.GetInputSourceHandle(EasyOpenVRSingleton.InputSource.RightFoot);
234-
_inputSourceHandles[9] = _ovr.GetInputSourceHandle(EasyOpenVRSingleton.InputSource.Waist);
225+
ulong index = 0L;
226+
_inputSourceHandles[index++] = _inputSourceHandleLeft;
227+
_inputSourceHandles[index++] = _inputSourceHandleRight;
228+
_inputSourceHandles[index++] = _ovr.GetInputSourceHandle(EasyOpenVRSingleton.InputSource.Head);
229+
_inputSourceHandles[index++] = _ovr.GetInputSourceHandle(EasyOpenVRSingleton.InputSource.Chest);
230+
_inputSourceHandles[index++] = _ovr.GetInputSourceHandle(EasyOpenVRSingleton.InputSource.LeftShoulder);
231+
_inputSourceHandles[index++] = _ovr.GetInputSourceHandle(EasyOpenVRSingleton.InputSource.LeftElbow);
232+
_inputSourceHandles[index++] = _ovr.GetInputSourceHandle(EasyOpenVRSingleton.InputSource.LeftKnee);
233+
_inputSourceHandles[index++] = _ovr.GetInputSourceHandle(EasyOpenVRSingleton.InputSource.LeftFoot);
234+
_inputSourceHandles[index++] = _ovr.GetInputSourceHandle(EasyOpenVRSingleton.InputSource.RightShoulder);
235+
_inputSourceHandles[index++] = _ovr.GetInputSourceHandle(EasyOpenVRSingleton.InputSource.RightElbow);
236+
_inputSourceHandles[index++] = _ovr.GetInputSourceHandle(EasyOpenVRSingleton.InputSource.RightKnee);
237+
_inputSourceHandles[index++] = _ovr.GetInputSourceHandle(EasyOpenVRSingleton.InputSource.RightFoot);
238+
_inputSourceHandles[index++] = _ovr.GetInputSourceHandle(EasyOpenVRSingleton.InputSource.Waist);
239+
_inputSourceHandles[index++] = _ovr.GetInputSourceHandle(EasyOpenVRSingleton.InputSource.Camera);
235240
}
236241

237242
// New app is running, distribute new app ID

OpenVR2Key/Properties/Resources.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

OpenVR2Key/Properties/Resources.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,6 @@
128128
<value>..\resources\logo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
129129
</data>
130130
<data name="Version" xml:space="preserve">
131-
<value>v0.60</value>
131+
<value>v0.61</value>
132132
</data>
133133
</root>

0 commit comments

Comments
 (0)