Showing the changes to interface/src/Application.cpp (1 of 296 files). Show all
Unified · Split
| @@ -140,7 +140,7 @@ · 139 unmodified lines | ||
| 140 | 140 | #include "devices/Leapmotion.h" |
| 141 | 141 | #include "DiscoverabilityManager.h" |
| 142 | 142 | #include "GLCanvas.h" |
| 143 | −#include "InterfaceActionFactory.h" | |
| 143 | +#include "InterfaceDynamicFactory.h" | |
| 144 | 144 | #include "InterfaceLogging.h" |
| 145 | 145 | #include "LODManager.h" |
| 146 | 146 | #include "ModelPackager.h" |
| @@ -462,7 +462,7 @@ bool setupEssentials(int& argc, char** argv) { · 315 unmodified lines | ||
| 462 | 462 | |
| 463 | 463 | DependencyManager::registerInheritance<LimitedNodeList, NodeList>(); |
| 464 | 464 | DependencyManager::registerInheritance<AvatarHashMap, AvatarManager>(); |
| 465 | − DependencyManager::registerInheritance<EntityActionFactoryInterface, InterfaceActionFactory>(); | |
| 465 | + DependencyManager::registerInheritance<EntityDynamicFactoryInterface, InterfaceDynamicFactory>(); | |
| 466 | 466 | DependencyManager::registerInheritance<SpatialParentFinder, InterfaceParentFinder>(); |
| 467 | 467 | |
| 468 | 468 | // Set dependencies |
| @@ -516,7 +516,7 @@ bool setupEssentials(int& argc, char** argv) { · 47 unmodified lines | ||
| 516 | 516 | DependencyManager::set<OffscreenUi>(); |
| 517 | 517 | DependencyManager::set<AutoUpdater>(); |
| 518 | 518 | DependencyManager::set<PathUtils>(); |
| 519 | − DependencyManager::set<InterfaceActionFactory>(); | |
| 519 | + DependencyManager::set<InterfaceDynamicFactory>(); | |
| 520 | 520 | DependencyManager::set<AudioInjectorManager>(); |
| 521 | 521 | DependencyManager::set<MessagesClient>(); |
| 522 | 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 | 4440 | _entitySimulation->setObjectsToChange(stillNeedChange); |
| 4441 | 4441 | }); |
| 4442 | 4442 | |
| 4443 | − _entitySimulation->applyActionChanges(); | |
| 4443 | + _entitySimulation->applyDynamicChanges(); | |
| 4444 | 4444 | |
| 4445 | 4445 | avatarManager->getObjectsToRemoveFromPhysics(motionStates); |
| 4446 | 4446 | _physicsEngine->removeObjects(motionStates); |
| @@ -4450,8 +4450,8 @@ void Application::update(float deltaTime) { · 3 unmodified lines | ||
| 4450 | 4450 | _physicsEngine->changeObjects(motionStates); |
| 4451 | 4451 | |
| 4452 | 4452 | myAvatar->prepareForPhysicsSimulation(); |
| 4453 | − _physicsEngine->forEachAction([&](EntityActionPointer action) { | |
| 4454 | − action->prepareForPhysicsSimulation(); | |
| 4453 | + _physicsEngine->forEachDynamic([&](EntityDynamicPointer dynamic) { | |
| 4454 | + dynamic->prepareForPhysicsSimulation(); | |
| 4455 | 4455 | }); |
| 4456 | 4456 | } |
| 4457 | 4457 | { |
| @@ -6761,11 +6761,6 @@ void Application::updateDisplayMode() { · 2303 unmodified lines | ||
| 6761 | 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 | 6764 | auto offscreenUi = DependencyManager::get<OffscreenUi>(); |
| 6770 | 6765 | |
| 6771 | 6766 | // Make the switch atomic from the perspective of other threads |
| @@ -6820,13 +6815,16 @@ void Application::updateDisplayMode() { · 48 unmodified lines | ||
| 6820 | 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 | 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 | 6829 | // reset the avatar, to set head and hand palms back to a reasonable default pose. |
| 6832 | 6830 | getMyAvatar()->reset(false); |