removed print statement in application.cpp and added check of button flag in openvrhelpers.cpp

This commit is contained in:
amantley 2018-12-19 12:00:40 -08:00
parent da05692e5d
commit b8c0d6d9f9
2 changed files with 8 additions and 4 deletions

View file

@ -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();
}

View file

@ -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;
}
}