Showing the changes to interface/src/Application.cpp (1 of 296 files). Show all
Unified · Split
| @@ -140,7 +140,7 @@ · 139 unmodified lines | |||
| 140 | #include "devices/Leapmotion.h" | 140 | #include "devices/Leapmotion.h" |
| 141 | #include "DiscoverabilityManager.h" | 141 | #include "DiscoverabilityManager.h" |
| 142 | #include "GLCanvas.h" | 142 | #include "GLCanvas.h" |
| 143 | #include "InterfaceActionFactory.h" | 143 | #include "InterfaceDynamicFactory.h" |
| 144 | #include "InterfaceLogging.h" | 144 | #include "InterfaceLogging.h" |
| 145 | #include "LODManager.h" | 145 | #include "LODManager.h" |
| 146 | #include "ModelPackager.h" | 146 | #include "ModelPackager.h" |
| @@ -462,7 +462,7 @@ bool setupEssentials(int& argc, char** argv) { · 315 unmodified lines | |||
| 462 | 462 | ||
| 463 | DependencyManager::registerInheritance<LimitedNodeList, NodeList>(); | 463 | DependencyManager::registerInheritance<LimitedNodeList, NodeList>(); |
| 464 | DependencyManager::registerInheritance<AvatarHashMap, AvatarManager>(); | 464 | DependencyManager::registerInheritance<AvatarHashMap, AvatarManager>(); |
| 465 | DependencyManager::registerInheritance<EntityActionFactoryInterface, InterfaceActionFactory>(); | 465 | DependencyManager::registerInheritance<EntityDynamicFactoryInterface, InterfaceDynamicFactory>(); |
| 466 | DependencyManager::registerInheritance<SpatialParentFinder, InterfaceParentFinder>(); | 466 | DependencyManager::registerInheritance<SpatialParentFinder, InterfaceParentFinder>(); |
| 467 | 467 | ||
| 468 | // Set dependencies | 468 | // Set dependencies |
| @@ -516,7 +516,7 @@ bool setupEssentials(int& argc, char** argv) { · 47 unmodified lines | |||
| 516 | DependencyManager::set<OffscreenUi>(); | 516 | DependencyManager::set<OffscreenUi>(); |
| 517 | DependencyManager::set<AutoUpdater>(); | 517 | DependencyManager::set<AutoUpdater>(); |
| 518 | DependencyManager::set<PathUtils>(); | 518 | DependencyManager::set<PathUtils>(); |
| 519 | DependencyManager::set<InterfaceActionFactory>(); | 519 | DependencyManager::set<InterfaceDynamicFactory>(); |
| 520 | DependencyManager::set<AudioInjectorManager>(); | 520 | DependencyManager::set<AudioInjectorManager>(); |
| 521 | DependencyManager::set<MessagesClient>(); | 521 | DependencyManager::set<MessagesClient>(); |
| 522 | controller::StateController::setStateVariables({ { STATE_IN_HMD, STATE_CAMERA_FULL_SCREEN_MIRROR, | 522 | controller::StateController::setStateVariables({ { STATE_IN_HMD, STATE_CAMERA_FULL_SCREEN_MIRROR, |
| @@ -4440,7 +4440,7 @@ void Application::update(float deltaTime) { · 3917 unmodified lines | |||
| 4440 | _entitySimulation->setObjectsToChange(stillNeedChange); | 4440 | _entitySimulation->setObjectsToChange(stillNeedChange); |
| 4441 | }); | 4441 | }); |
| 4442 | 4442 | ||
| 4443 | _entitySimulation->applyActionChanges(); | 4443 | _entitySimulation->applyDynamicChanges(); |
| 4444 | 4444 | ||
| 4445 | avatarManager->getObjectsToRemoveFromPhysics(motionStates); | 4445 | avatarManager->getObjectsToRemoveFromPhysics(motionStates); |
| 4446 | _physicsEngine->removeObjects(motionStates); | 4446 | _physicsEngine->removeObjects(motionStates); |
| @@ -4450,8 +4450,8 @@ void Application::update(float deltaTime) { · 3 unmodified lines | |||
| 4450 | _physicsEngine->changeObjects(motionStates); | 4450 | _physicsEngine->changeObjects(motionStates); |
| 4451 | 4451 | ||
| 4452 | myAvatar->prepareForPhysicsSimulation(); | 4452 | myAvatar->prepareForPhysicsSimulation(); |
| 4453 | _physicsEngine->forEachAction([&](EntityActionPointer action) { | 4453 | _physicsEngine->forEachDynamic([&](EntityDynamicPointer dynamic) { |
| 4454 | action->prepareForPhysicsSimulation(); | 4454 | dynamic->prepareForPhysicsSimulation(); |
| 4455 | }); | 4455 | }); |
| 4456 | } | 4456 | } |
| 4457 | { | 4457 | { |
| @@ -6761,11 +6761,6 @@ void Application::updateDisplayMode() { · 2303 unmodified lines | |||
| 6761 | return; | 6761 | return; |
| 6762 | } | 6762 | } |
| 6763 | 6763 | ||
| 6764 | UserActivityLogger::getInstance().logAction("changed_display_mode", { | ||
| 6765 | { "previous_display_mode", _displayPlugin ? _displayPlugin->getName() : "" }, | ||
| 6766 | { "display_mode", newDisplayPlugin ? newDisplayPlugin->getName() : "" } | ||
| 6767 | }); | ||
| 6768 | |||
| 6769 | auto offscreenUi = DependencyManager::get<OffscreenUi>(); | 6764 | auto offscreenUi = DependencyManager::get<OffscreenUi>(); |
| 6770 | 6765 | ||
| 6771 | // Make the switch atomic from the perspective of other threads | 6766 | // Make the switch atomic from the perspective of other threads |
| @@ -6820,13 +6815,16 @@ void Application::updateDisplayMode() { · 48 unmodified lines | |||
| 6820 | offscreenUi->getDesktop()->setProperty("repositionLocked", wasRepositionLocked); | 6815 | offscreenUi->getDesktop()->setProperty("repositionLocked", wasRepositionLocked); |
| 6821 | } | 6816 | } |
| 6822 | 6817 | ||
| 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 | }); | ||
| 6823 | emit activeDisplayPluginChanged(); | 6827 | emit activeDisplayPluginChanged(); |
| 6824 | |||
| 6825 | if (_displayPlugin->isHmd()) { | ||
| 6826 | qCDebug(interfaceapp) << "Entering into HMD Mode"; | ||
| 6827 | } else { | ||
| 6828 | qCDebug(interfaceapp) << "Entering into Desktop Mode"; | ||
| 6829 | } | ||
| 6830 | 6828 | ||
| 6831 | // reset the avatar, to set head and hand palms back to a reasonable default pose. | 6829 | // reset the avatar, to set head and hand palms back to a reasonable default pose. |
| 6832 | getMyAvatar()->reset(false); | 6830 | getMyAvatar()->reset(false); |