mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 12:14:00 +02:00
mutex added
This commit is contained in:
parent
ba884f8a94
commit
e3594fe1b7
2 changed files with 4 additions and 1 deletions
|
@ -263,11 +263,13 @@ void MyAvatar::setDominantHand(const QString& hand) {
|
|||
}
|
||||
|
||||
void MyAvatar::requestDisableHandTouch() {
|
||||
std::lock_guard<std::mutex> guard(_disableHandTouchMutex);
|
||||
_disableHandTouchCount++;
|
||||
emit shouldDisableHandTouchChanged(_disableHandTouchCount > 0);
|
||||
}
|
||||
|
||||
void MyAvatar::requestEnableHandTouch() {
|
||||
std::lock_guard<std::mutex> guard(_disableHandTouchMutex);
|
||||
_disableHandTouchCount = std::max(_disableHandTouchCount - 1, 0);
|
||||
emit shouldDisableHandTouchChanged(_disableHandTouchCount > 0);
|
||||
}
|
||||
|
|
|
@ -1666,6 +1666,7 @@ private:
|
|||
// all poses are in sensor-frame
|
||||
std::map<controller::Action, controller::Pose> _controllerPoseMap;
|
||||
mutable std::mutex _controllerPoseMapMutex;
|
||||
mutable std::mutex _disableHandTouchMutex;
|
||||
|
||||
bool _centerOfGravityModelEnabled { true };
|
||||
bool _hmdLeanRecenterEnabled { true };
|
||||
|
@ -1706,7 +1707,7 @@ private:
|
|||
bool _shouldLoadScripts { false };
|
||||
|
||||
bool _haveReceivedHeightLimitsFromDomain { false };
|
||||
std::atomic<int> _disableHandTouchCount { 0 };
|
||||
int _disableHandTouchCount { 0 };
|
||||
};
|
||||
|
||||
QScriptValue audioListenModeToScriptValue(QScriptEngine* engine, const AudioListenerMode& audioListenerMode);
|
||||
|
|
Loading…
Reference in a new issue