mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-05 21:22:07 +02:00
Merge pull request #16314 from huffman/fix/oculus-touch-calibration-crash
DEV-841: Fix oculus calibration screen crash if touch is not turned on
This commit is contained in:
commit
f71dfa065c
2 changed files with 4 additions and 4 deletions
|
@ -50,13 +50,13 @@ QString OculusControllerManager::configurationLayout() {
|
|||
|
||||
void OculusControllerManager::setConfigurationSettings(const QJsonObject configurationSettings) {
|
||||
if (configurationSettings.contains("trackControllersInOculusHome")) {
|
||||
_touch->_trackControllersInOculusHome.set(configurationSettings["trackControllersInOculusHome"].toBool());
|
||||
_trackControllersInOculusHome.set(configurationSettings["trackControllersInOculusHome"].toBool());
|
||||
}
|
||||
}
|
||||
|
||||
QJsonObject OculusControllerManager::configurationSettings() {
|
||||
QJsonObject configurationSettings;
|
||||
configurationSettings["trackControllersInOculusHome"] = _touch->_trackControllersInOculusHome.get();
|
||||
configurationSettings["trackControllersInOculusHome"] = _trackControllersInOculusHome.get();
|
||||
return configurationSettings;
|
||||
}
|
||||
|
||||
|
@ -232,7 +232,7 @@ void OculusControllerManager::TouchDevice::update(float deltaTime,
|
|||
quint64 currentTime = usecTimestampNow();
|
||||
static const auto REQUIRED_HAND_STATUS = ovrStatus_OrientationTracked | ovrStatus_PositionTracked;
|
||||
bool hasInputFocus = ovr::hasInputFocus();
|
||||
bool trackControllersInOculusHome = _trackControllersInOculusHome.get();
|
||||
bool trackControllersInOculusHome = _parent._trackControllersInOculusHome.get();
|
||||
auto tracking = ovr::getTrackingState(); // ovr_GetTrackingState(_parent._session, 0, false);
|
||||
ovr::for_each_hand([&](ovrHandType hand) {
|
||||
++numTrackedControllers;
|
||||
|
|
|
@ -98,7 +98,6 @@ private:
|
|||
float _leftHapticStrength { 0.0f };
|
||||
float _rightHapticDuration { 0.0f };
|
||||
float _rightHapticStrength { 0.0f };
|
||||
Setting::Handle<bool> _trackControllersInOculusHome { "trackControllersInOculusHome", false };
|
||||
mutable std::recursive_mutex _lock;
|
||||
std::map<int, bool> _lostTracking;
|
||||
std::map<int, quint64> _regainTrackingDeadline;
|
||||
|
@ -109,6 +108,7 @@ private:
|
|||
|
||||
void checkForConnectedDevices();
|
||||
|
||||
Setting::Handle<bool> _trackControllersInOculusHome { "trackControllersInOculusHome", false };
|
||||
ovrInputState _remoteInputState {};
|
||||
ovrInputState _touchInputState {};
|
||||
RemoteDevice::Pointer _remote;
|
||||
|
|
Loading…
Reference in a new issue