Skip to content

Commit 73f4451

Browse files
authored
Merge pull request #3772 from wiwei/apicontract
Gate the articulated hand update loop behind a platform check.
2 parents 63c6563 + c85c971 commit 73f4451

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityArticulatedHand.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using Windows.Perception;
1616
using Windows.Perception.People;
1717
using Windows.UI.Input.Spatial;
18+
using Microsoft.MixedReality.Toolkit.Windows.Utilities;
1819
#endif
1920

2021
namespace Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input
@@ -220,6 +221,14 @@ protected override void UpdateControllerData(InteractionSourceState interactionS
220221
base.UpdateControllerData(interactionSourceState);
221222

222223
#if WINDOWS_UWP
224+
// The articulated hand support is only present in the 18361 version and beyond Windows
225+
// SDK (which contains the V8 drop of the Universal API Contract). In particular,
226+
// the HandPose related APIs are only present on this version and above.
227+
if (!WindowsApiChecker.UniversalApiContractV8_IsAvailable)
228+
{
229+
return;
230+
}
231+
223232
PerceptionTimestamp perceptionTimestamp = PerceptionTimestampHelper.FromHistoricalTargetTime(DateTimeOffset.Now);
224233
IReadOnlyList<SpatialInteractionSourceState> sources = spatialInteractionManager?.GetDetectedSourcesAtTimestamp(perceptionTimestamp);
225234
foreach (SpatialInteractionSourceState sourceState in sources)

0 commit comments

Comments
 (0)