mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
guard sixense from updating before activated
This commit is contained in:
parent
f051a84dc6
commit
4107f4ea9f
2 changed files with 8 additions and 0 deletions
|
@ -122,6 +122,7 @@ void SixenseManager::activate() {
|
|||
#endif
|
||||
loadSettings();
|
||||
sixenseInit();
|
||||
_activated = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -138,6 +139,7 @@ void SixenseManager::deactivate() {
|
|||
#endif
|
||||
|
||||
sixenseExit();
|
||||
_activated = false;
|
||||
|
||||
#ifdef __APPLE__
|
||||
delete _sixenseLibrary;
|
||||
|
@ -157,6 +159,9 @@ void SixenseManager::setSixenseFilter(bool filter) {
|
|||
}
|
||||
|
||||
void SixenseManager::update(float deltaTime, bool jointsCaptured) {
|
||||
if (!_activated) {
|
||||
return;
|
||||
}
|
||||
#ifdef HAVE_SIXENSE
|
||||
_buttonPressedMap.clear();
|
||||
|
||||
|
|
|
@ -117,6 +117,9 @@ private:
|
|||
|
||||
static const QString NAME;
|
||||
static const QString HYDRA_ID_STRING;
|
||||
|
||||
bool _activated = false;
|
||||
|
||||
};
|
||||
|
||||
#endif // hifi_SixenseManager_h
|
||||
|
|
Loading…
Reference in a new issue