From b139500864a15170690d8d54ff454e1747576c5f Mon Sep 17 00:00:00 2001 From: bjorn Date: Tue, 29 Sep 2020 16:34:44 -0600 Subject: [PATCH] Upgrade OpenVR; --- deps/openvr | 2 +- src/modules/headset/headset_openvr.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deps/openvr b/deps/openvr index b72abceb..0eb70325 160000 --- a/deps/openvr +++ b/deps/openvr @@ -1 +1 @@ -Subproject commit b72abcebff7e6c6c70ce8ac8f6a09b70d44397e2 +Subproject commit 0eb70325a4ea3edca2a0ff8aefa631f2529e6eb7 diff --git a/src/modules/headset/headset_openvr.c b/src/modules/headset/headset_openvr.c index e8e2b97d..b5d95714 100644 --- a/src/modules/headset/headset_openvr.c +++ b/src/modules/headset/headset_openvr.c @@ -360,7 +360,7 @@ static bool openvr_getPose(Device device, vec3 position, quat orientation) { if (device == DEVICE_HAND_LEFT || device == DEVICE_HAND_RIGHT) { InputPoseActionData_t action; - state.input->GetPoseActionData(state.poseActions[device], state.compositor->GetTrackingSpace(), 0.f, &action, sizeof(action), 0); + state.input->GetPoseActionDataForNextFrame(state.poseActions[device], state.compositor->GetTrackingSpace(), &action, sizeof(action), 0); mat4_fromMat34(transform, action.pose.mDeviceToAbsoluteTracking.m); transform[13] += state.offset; mat4_getPosition(transform, position); @@ -378,7 +378,7 @@ static bool openvr_getVelocity(Device device, vec3 velocity, vec3 angularVelocit if (device == DEVICE_HEAD) { pose = &state.renderPoses[k_unTrackedDeviceIndex_Hmd]; } else if (device == DEVICE_HAND_LEFT || device == DEVICE_HAND_RIGHT) { - state.input->GetPoseActionData(state.poseActions[device], state.compositor->GetTrackingSpace(), 0.f, &action, sizeof(action), 0); + state.input->GetPoseActionDataForNextFrame(state.poseActions[device], state.compositor->GetTrackingSpace(), &action, sizeof(action), 0); pose = &action.pose; } else { return false; @@ -430,7 +430,7 @@ static bool openvr_getSkeleton(Device device, float* poses) { // Bone transforms are relative to the hand instead of the origin, so get the hand pose first InputPoseActionData_t handPose; - state.input->GetPoseActionData(state.poseActions[device], state.compositor->GetTrackingSpace(), 0.f, &handPose, sizeof(handPose), 0); + state.input->GetPoseActionDataForNextFrame(state.poseActions[device], state.compositor->GetTrackingSpace(), &handPose, sizeof(handPose), 0); if (!handPose.pose.bPoseIsValid) { return false; }