Move the disabling of the touch module to the beginning of the PreSync function to hopefully prevent errant inputs

This commit is contained in:
Alexander Bock
2022-04-21 10:57:13 +02:00
committed by Alexander Bock
parent 36a4ba53d4
commit dd272ddf3c

View File

@@ -231,10 +231,14 @@ void TouchModule::internalInitialize(const ghoul::Dictionary& /*dictionary*/){
global::callback::preSync->push_back([&]() {
if (!_touchActive) {
return;
}
_touch.setCamera(global::navigationHandler->camera());
_touch.setFocusNode(global::navigationHandler->orbitalNavigator().anchorNode());
if (processNewInput() && global::windowDelegate->isMaster() && _touchActive) {
if (processNewInput() && global::windowDelegate->isMaster()) {
_touch.updateStateFromInput(_touchPoints, _lastTouchInputs);
}
else if (_touchPoints.empty()) {