History

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

Stephen Birarda committed 11 years ago

Commit 25aeda22 parents b2778bf 670c5ee30 files · +1684 −102Browse files

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

Unified · Split

interface/src/Application.cpp+13−7
@@ -622,6 +622,15 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 621 unmodified lines
622622 // Setup the userInputMapper with the actions
623623 auto userInputMapper = DependencyManager::get<UserInputMapper>();
624624 connect(userInputMapper.data(), &UserInputMapper::actionEvent, &_controllerScriptingInterface, &AbstractControllerScriptingInterface::actionEvent);
625+ connect(userInputMapper.data(), &UserInputMapper::actionEvent, [this](int action, float state) {
626+ if (state) {
627+ switch (action) {
628+ case UserInputMapper::Action::TOGGLE_MUTE:
629+ DependencyManager::get<AudioClient>()->toggleMute();
630+ break;
631+ }
632+ }
633+ });
625634
626635 // Setup the keyboardMouseDevice and the user input mapper with the default bindings
627636 _keyboardMouseDevice->registerToUserInputMapper(*userInputMapper);
@@ -3070,9 +3079,8 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node · 2442 unmodified lines
30703079 voxelDetailsForCode(rootCode, rootDetails);
30713080 AACube serverBounds(glm::vec3(rootDetails.x * TREE_SCALE,
30723081 rootDetails.y * TREE_SCALE,
3073− rootDetails.z * TREE_SCALE),
3082+ rootDetails.z * TREE_SCALE) - glm::vec3(HALF_TREE_SCALE),
30743083 rootDetails.s * TREE_SCALE);
3075−
30763084 ViewFrustum::location serverFrustumLocation = _viewFrustum.cubeInFrustum(serverBounds);
30773085
30783086 if (serverFrustumLocation != ViewFrustum::OUTSIDE) {
@@ -3137,11 +3145,10 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node · 58 unmodified lines
31373145 voxelDetailsForCode(rootCode, rootDetails);
31383146 AACube serverBounds(glm::vec3(rootDetails.x * TREE_SCALE,
31393147 rootDetails.y * TREE_SCALE,
3140− rootDetails.z * TREE_SCALE),
3148+ rootDetails.z * TREE_SCALE) - glm::vec3(HALF_TREE_SCALE),
31413149 rootDetails.s * TREE_SCALE);
31423150
31433151
3144−
31453152 ViewFrustum::location serverFrustumLocation = _viewFrustum.cubeInFrustum(serverBounds);
31463153 if (serverFrustumLocation != ViewFrustum::OUTSIDE) {
31473154 inView = true;
@@ -3160,7 +3167,7 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node · 12 unmodified lines
31603167 } else if (unknownView) {
31613168 if (wantExtraDebugging) {
31623169 qCDebug(interfaceapp) << "no known jurisdiction for node " << *node << ", give it budget of "
3163− << perUnknownServer << " to send us jurisdiction.";
3170+ << perUnknownServer << " to send us jurisdiction.";
31643171 }
31653172
31663173 // set the query's position/orientation to be degenerate in a manner that will get the scene quickly
@@ -5101,11 +5108,10 @@ void Application::emulateMouse(Hand* hand, float click, float shift, int index) · 1934 unmodified lines
51015108 }
51025109
51035110 void Application::crashApplication() {
5111+ qCDebug(interfaceapp) << "Intentionally crashed Interface";
51045112 QObject* object = nullptr;
51055113 bool value = object->isWindowType();
51065114 Q_UNUSED(value);
5107−
5108− qCDebug(interfaceapp) << "Intentionally crashed Interface";
51095115 }
51105116
51115117 void Application::setActiveDisplayPlugin(const QString& pluginName) {