mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Fix crash when enable Leap Motion
This commit is contained in:
parent
e1dcf01706
commit
9f48a139cc
1 changed files with 5 additions and 11 deletions
|
@ -365,20 +365,14 @@ void LeapMotionPlugin::init() {
|
|||
bool LeapMotionPlugin::activate() {
|
||||
InputPlugin::activate();
|
||||
|
||||
if (_enabled) {
|
||||
// Nothing required to be done to start up Leap Motion.
|
||||
// Nothing required to be done to start up Leap Motion library.
|
||||
|
||||
auto userInputMapper = DependencyManager::get<controller::UserInputMapper>();
|
||||
userInputMapper->registerDevice(_inputDevice);
|
||||
_joints.resize(LeapMotionJointIndex::Size, { glm::vec3(), glm::quat() });
|
||||
|
||||
if (_joints.size() != LeapMotionJointIndex::Size) {
|
||||
_joints.resize(LeapMotionJointIndex::Size, { glm::vec3(), glm::quat() });
|
||||
}
|
||||
auto userInputMapper = DependencyManager::get<controller::UserInputMapper>();
|
||||
userInputMapper->registerDevice(_inputDevice);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void LeapMotionPlugin::deactivate() {
|
||||
|
|
Loading…
Reference in a new issue