Skip to content

Commit c455058

Browse files
authored
Merge pull request #9994 from keveleigh/update-filtering
Update filtering for UnityJoystickManager
2 parents 0bfbec7 + f055bdd commit c455058

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Assets/MRTK/Core/Providers/UnityInput/UnityJoystickManager.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ namespace Microsoft.MixedReality.Toolkit.Input.UnityInput
1818
typeof(IMixedRealityInputSystem),
1919
(SupportedPlatforms)(-1), // All platforms supported by Unity
2020
"Unity Joystick Manager")]
21-
#if UNITY_2020_1_OR_NEWER
22-
[Obsolete("The legacy XR pipeline has been removed in Unity 2020 or newer. Please migrate to XR SDK.")]
23-
#endif // UNITY_2020_1_OR_NEWER
2421
public class UnityJoystickManager : BaseInputDeviceManager
2522
{
2623
/// <summary>
@@ -237,8 +234,11 @@ protected virtual SupportedControllerType GetCurrentControllerType(string joysti
237234
{
238235
// todo: this should be using an allow list, not a disallow list
239236
if (string.IsNullOrEmpty(joystickName) ||
240-
joystickName.Contains("OpenVR") ||
241-
joystickName.Contains("Spatial"))
237+
joystickName.Contains("OpenVR") || // This catches input sources from legacy OpenVR
238+
joystickName.Contains("OpenXR") || // This catches input sources from OpenXR Plugin
239+
joystickName.Contains("Oculus") || // This catches controllers from Oculus XR Plugin
240+
joystickName.Contains("Hand - ") || // This catches HoloLens hands from Windows XR Plugin
241+
joystickName.Contains("Spatial")) // This catches controllers from Windows XR Plugin and all input sources from legacy WMR
242242
{
243243
return 0;
244244
}

0 commit comments

Comments
 (0)