mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 12:37:51 +02:00
if call to ovr_GetSessionStatus fails, also don't take input from controllers
This commit is contained in:
parent
ed4b3cde6b
commit
8f76c43bc1
1 changed files with 1 additions and 2 deletions
|
@ -183,8 +183,7 @@ void OculusControllerManager::TouchDevice::update(float deltaTime, const control
|
||||||
_buttonPressedMap.clear();
|
_buttonPressedMap.clear();
|
||||||
|
|
||||||
ovrSessionStatus status;
|
ovrSessionStatus status;
|
||||||
if (OVR_SUCCESS(ovr_GetSessionStatus(_parent._session, &status)) &&
|
if (!OVR_SUCCESS(ovr_GetSessionStatus(_parent._session, &status)) || (ovrFalse == status.HmdMounted)) {
|
||||||
(ovrFalse == status.HmdMounted)) {
|
|
||||||
// if the HMD isn't on someone's head, don't take input from the controllers
|
// if the HMD isn't on someone's head, don't take input from the controllers
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue