saving work

This commit is contained in:
Dante Ruiz 2017-06-30 19:07:34 +01:00
parent 3a096381ce
commit 3e1aee4d8a
2 changed files with 14 additions and 1 deletions

View file

@ -28,6 +28,8 @@
#include <GLMHelpers.h>
#include <glm/ext.hpp>
#include <glm/gtc/quaternion.hpp>
#include <ui-plugins/PluginContainer.h>
#include <plugins/DisplayPlugin.h>
#include <controllers/UserInputMapper.h>
#include <Plugins/InputConfiguration.h>
@ -121,6 +123,13 @@ static QString deviceTrackingResultToString(vr::ETrackingResult trackingResult)
return result;
}
bool ViveControllerManager::isDesktopMode() {
if (_container) {
return !_container->getActiveDisplayPlugin()->isHmd();
}
return false;
}
void ViveControllerManager::calibrate() {
if (isSupported()) {
_inputDevice->calibrateNextFrame();
@ -218,6 +227,10 @@ void ViveControllerManager::pluginUpdate(float deltaTime, const controller::Inpu
return;
}
if (isDesktopMode()) {
qDebug() << "In desktop mode";
}
auto userInputMapper = DependencyManager::get<controller::UserInputMapper>();
handleOpenVrEvents();
if (openVrQuitRequested()) {

View file

@ -189,7 +189,7 @@ private:
};
void renderHand(const controller::Pose& pose, gpu::Batch& batch, int sign);
bool isDesktopMode();
bool _registeredWithInputMapper { false };
bool _modelLoaded { false };
model::Geometry _modelGeometry;