diff --git a/modules/touch/src/touchinteraction.cpp b/modules/touch/src/touchinteraction.cpp index 8942042a52..7525a4a297 100644 --- a/modules/touch/src/touchinteraction.cpp +++ b/modules/touch/src/touchinteraction.cpp @@ -25,8 +25,9 @@ #include #include #include +#ifdef OPENSPACE_MODULE_WEBBROWSER_ENABLED #include -#include +#endif #include #include @@ -437,8 +438,12 @@ bool TouchInteraction::webContent(const std::vector& list) { list.at(0).getScreenY(res.y) ); +#ifdef OPENSPACE_MODULE_WEBBROWSER_ENABLED WebBrowserModule& module = *(global::moduleEngine.module()); return module.eventHandler().hasContentCallback(pos.x, pos.y); +#else + return false; +#endif } // Activates/Deactivates gui input mode (if active it voids all other interactions) @@ -1327,8 +1332,6 @@ void TouchInteraction::step(double dt) { planetBoundaryRadius *= _zoomBoundarySphereMultiplier; double distToSurface = length(centerToCamera - planetBoundaryRadius); - WebGuiModule& module = *(global::moduleEngine.module()); - //Apply the velocity to update camera position glm::dvec3 velocityIncr = directionToCenter * _vel.zoom * dt; bool isDeltaLessThanDistToSurface = (length(_vel.zoom * dt) < distToSurface); diff --git a/modules/touch/touchmodule.cpp b/modules/touch/touchmodule.cpp index 9084937aaf..0ebf0c2498 100644 --- a/modules/touch/touchmodule.cpp +++ b/modules/touch/touchmodule.cpp @@ -23,8 +23,9 @@ ****************************************************************************************/ #include +#ifdef OPENSPACE_MODULE_WEBBROWSER_ENABLED #include -#include +#endif #include #include @@ -122,6 +123,7 @@ void TouchModule::hasNewWebInput(const std::vector& listOfContactPoi listOfContactPoints.at(0).getScreenY(res.y) ); +#ifdef OPENSPACE_MODULE_WEBBROWSER_ENABLED WebBrowserModule& module = *(global::moduleEngine.module()); if (module.eventHandler().hasContentCallback(pos.x, pos.y)) { webPositionCallback = glm::vec2(pos.x, pos.y); @@ -134,6 +136,7 @@ void TouchModule::hasNewWebInput(const std::vector& listOfContactPoi module.eventHandler().touchReleaseCallback(webPositionCallback.x, webPositionCallback.y); webPositionCallback = glm::vec2(0, 0); +#endif } }