From b8c0d6d9f998bd7c209cae665faa88fa0ede1eee Mon Sep 17 00:00:00 2001 From: amantley Date: Wed, 19 Dec 2018 12:00:40 -0800 Subject: [PATCH] removed print statement in application.cpp and added check of button flag in openvrhelpers.cpp --- interface/src/Application.cpp | 4 ++-- plugins/openvr/src/OpenVrHelpers.cpp | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index a8bab618a0..36100ea79f 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -6611,8 +6611,8 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType) { bool Application::isHMDMode() const { - qDebug() << "the hmd is visible " << getActiveDisplayPlugin()->isDisplayVisible(); - qDebug() << "the hmd is active " << getActiveDisplayPlugin()->isHmd(); + // qDebug() << "the hmd is visible " << getActiveDisplayPlugin()->isDisplayVisible(); + // qDebug() << "the hmd is active " << getActiveDisplayPlugin()->isHmd(); return getActiveDisplayPlugin()->isHmd(); } diff --git a/plugins/openvr/src/OpenVrHelpers.cpp b/plugins/openvr/src/OpenVrHelpers.cpp index 6ee78a6b45..1475e63218 100644 --- a/plugins/openvr/src/OpenVrHelpers.cpp +++ b/plugins/openvr/src/OpenVrHelpers.cpp @@ -293,11 +293,15 @@ void handleOpenVrEvents() { if (activeHmd->GetControllerState(vr::k_unTrackedDeviceIndex_Hmd, &controllerState, sizeof(vr::VRControllerState_t))) { ulong prox = controllerState.ulButtonPressed & (1UL << ((int)vr::k_EButton_ProximitySensor)); qDebug() << "prox is -----------------------------> " << (int)prox; + bool test = false; + if (prox == (1UL << ((int)vr::k_EButton_ProximitySensor))) { + test = true; + } if (prox) { - qDebug() << "headset is on"; + qDebug() << "headset is on " << test; _headInHeadset = true; } else { - qDebug() << "headset is off"; + qDebug() << "headset is off " << test; _headInHeadset = false; } }