History

Merge branch 'master' of https://github.com/highfidelity/hifi into retrySkeletonURL

ZappoMan committed 9 years ago

Commit 90cdeb92 parents d179135 157dc14296 files · +91458 −1048Browse files

Showing the changes to interface/src/Application.cpp (1 of 296 files). Show all

Unified · Split

interface/src/Application.cpp+15−17
@@ -140,7 +140,7 @@ · 139 unmodified lines
140140 #include "devices/Leapmotion.h"
141141 #include "DiscoverabilityManager.h"
142142 #include "GLCanvas.h"
143−#include "InterfaceActionFactory.h"
143+#include "InterfaceDynamicFactory.h"
144144 #include "InterfaceLogging.h"
145145 #include "LODManager.h"
146146 #include "ModelPackager.h"
@@ -462,7 +462,7 @@ bool setupEssentials(int& argc, char** argv) { · 315 unmodified lines
462462
463463 DependencyManager::registerInheritance<LimitedNodeList, NodeList>();
464464 DependencyManager::registerInheritance<AvatarHashMap, AvatarManager>();
465− DependencyManager::registerInheritance<EntityActionFactoryInterface, InterfaceActionFactory>();
465+ DependencyManager::registerInheritance<EntityDynamicFactoryInterface, InterfaceDynamicFactory>();
466466 DependencyManager::registerInheritance<SpatialParentFinder, InterfaceParentFinder>();
467467
468468 // Set dependencies
@@ -516,7 +516,7 @@ bool setupEssentials(int& argc, char** argv) { · 47 unmodified lines
516516 DependencyManager::set<OffscreenUi>();
517517 DependencyManager::set<AutoUpdater>();
518518 DependencyManager::set<PathUtils>();
519− DependencyManager::set<InterfaceActionFactory>();
519+ DependencyManager::set<InterfaceDynamicFactory>();
520520 DependencyManager::set<AudioInjectorManager>();
521521 DependencyManager::set<MessagesClient>();
522522 controller::StateController::setStateVariables({ { STATE_IN_HMD, STATE_CAMERA_FULL_SCREEN_MIRROR,
@@ -4440,7 +4440,7 @@ void Application::update(float deltaTime) { · 3917 unmodified lines
44404440 _entitySimulation->setObjectsToChange(stillNeedChange);
44414441 });
44424442
4443− _entitySimulation->applyActionChanges();
4443+ _entitySimulation->applyDynamicChanges();
44444444
44454445 avatarManager->getObjectsToRemoveFromPhysics(motionStates);
44464446 _physicsEngine->removeObjects(motionStates);
@@ -4450,8 +4450,8 @@ void Application::update(float deltaTime) { · 3 unmodified lines
44504450 _physicsEngine->changeObjects(motionStates);
44514451
44524452 myAvatar->prepareForPhysicsSimulation();
4453− _physicsEngine->forEachAction([&](EntityActionPointer action) {
4454− action->prepareForPhysicsSimulation();
4453+ _physicsEngine->forEachDynamic([&](EntityDynamicPointer dynamic) {
4454+ dynamic->prepareForPhysicsSimulation();
44554455 });
44564456 }
44574457 {
@@ -6761,11 +6761,6 @@ void Application::updateDisplayMode() { · 2303 unmodified lines
67616761 return;
67626762 }
67636763
6764− UserActivityLogger::getInstance().logAction("changed_display_mode", {
6765− { "previous_display_mode", _displayPlugin ? _displayPlugin->getName() : "" },
6766− { "display_mode", newDisplayPlugin ? newDisplayPlugin->getName() : "" }
6767− });
6768−
67696764 auto offscreenUi = DependencyManager::get<OffscreenUi>();
67706765
67716766 // Make the switch atomic from the perspective of other threads
@@ -6820,13 +6815,16 @@ void Application::updateDisplayMode() { · 48 unmodified lines
68206815 offscreenUi->getDesktop()->setProperty("repositionLocked", wasRepositionLocked);
68216816 }
68226817
6818+ bool isHmd = _displayPlugin->isHmd();
6819+ qCDebug(interfaceapp) << "Entering into" << (isHmd ? "HMD" : "Desktop") << "Mode";
6820+
6821+ // Only log/emit after a successful change
6822+ UserActivityLogger::getInstance().logAction("changed_display_mode", {
6823+ { "previous_display_mode", _displayPlugin ? _displayPlugin->getName() : "" },
6824+ { "display_mode", newDisplayPlugin ? newDisplayPlugin->getName() : "" },
6825+ { "hmd", isHmd }
6826+ });
68236827 emit activeDisplayPluginChanged();
6824−
6825− if (_displayPlugin->isHmd()) {
6826− qCDebug(interfaceapp) << "Entering into HMD Mode";
6827− } else {
6828− qCDebug(interfaceapp) << "Entering into Desktop Mode";
6829− }
68306828
68316829 // reset the avatar, to set head and hand palms back to a reasonable default pose.
68326830 getMyAvatar()->reset(false);