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

This commit is contained in:
Andrzej Kapolka 2014-01-16 16:38:07 -08:00
commit 8c6c521b65
5 changed files with 27 additions and 18 deletions

View file

@ -1474,6 +1474,11 @@ void Application::setFullscreen(bool fullscreen) {
(_window->windowState() & ~Qt::WindowFullScreen));
}
void Application::setEnable3DTVMode(bool enable3DTVMode) {
resizeGL(_glWidget->width(),_glWidget->height());
}
void Application::setRenderVoxels(bool voxelRender) {
_voxelEditSender.setShouldSend(voxelRender);
if (!voxelRender) {

View file

@ -232,6 +232,8 @@ private slots:
void terminate();
void setFullscreen(bool fullscreen);
void setEnable3DTVMode(bool enable3DTVMode);
void renderThrustAtVoxel(const glm::vec3& thrust);

View file

@ -297,7 +297,7 @@ void Audio::handleAudioInput() {
QByteArray inputByteArray = _inputDevice->readAll();
if (Menu::getInstance()->isOptionChecked(MenuOption::EchoLocalAudio)) {
if (Menu::getInstance()->isOptionChecked(MenuOption::EchoLocalAudio) && !_muted) {
// if this person wants local loopback add that to the locally injected audio
if (!_loopbackOutputDevice) {

View file

@ -232,7 +232,10 @@ Menu::Menu() :
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::FirstPerson, Qt::Key_P, true);
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::Mirror, Qt::SHIFT | Qt::Key_H);
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::FullscreenMirror, Qt::Key_H);
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::Enable3DTVMode, 0, false);
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::Enable3DTVMode, 0,
false,
appInstance,
SLOT(setEnable3DTVMode(bool)));
QMenu* avatarSizeMenu = viewMenu->addMenu("Avatar Size");

View file

@ -674,9 +674,9 @@ void NodeList::pingPublicAndLocalSocketsForInactiveNode(Node* node) {
SharedNodePointer NodeList::addOrUpdateNode(const QUuid& uuid, char nodeType,
const HifiSockAddr& publicSocket, const HifiSockAddr& localSocket) {
NodeHash::iterator matchingNodeItem = _nodeHash.find(uuid);
if (matchingNodeItem == _nodeHash.end()) {
SharedNodePointer matchingNode = _nodeHash.value(uuid);
if (!matchingNode) {
// we didn't have this node, so add them
Node* newNode = new Node(uuid, nodeType, publicSocket, localSocket);
SharedNodePointer newNodeSharedPointer(newNode, &QObject::deleteLater);
@ -689,29 +689,28 @@ SharedNodePointer NodeList::addOrUpdateNode(const QUuid& uuid, char nodeType,
return newNodeSharedPointer;
} else {
SharedNodePointer node = matchingNodeItem.value();
QMutexLocker(&node->getMutex());
QMutexLocker(&matchingNode->getMutex());
if (node->getType() == NODE_TYPE_AUDIO_MIXER ||
node->getType() == NODE_TYPE_VOXEL_SERVER ||
node->getType() == NODE_TYPE_METAVOXEL_SERVER) {
if (matchingNode->getType() == NODE_TYPE_AUDIO_MIXER ||
matchingNode->getType() == NODE_TYPE_VOXEL_SERVER ||
matchingNode->getType() == NODE_TYPE_METAVOXEL_SERVER) {
// until the Audio class also uses our nodeList, we need to update
// the lastRecvTimeUsecs for the audio mixer so it doesn't get killed and re-added continously
node->setLastHeardMicrostamp(usecTimestampNow());
matchingNode->setLastHeardMicrostamp(usecTimestampNow());
}
// check if we need to change this node's public or local sockets
if (publicSocket != node->getPublicSocket()) {
node->setPublicSocket(publicSocket);
qDebug() << "Public socket change for node" << *node;
if (publicSocket != matchingNode->getPublicSocket()) {
matchingNode->setPublicSocket(publicSocket);
qDebug() << "Public socket change for node" << *matchingNode;
}
if (localSocket != node->getLocalSocket()) {
node->setLocalSocket(localSocket);
qDebug() << "Local socket change for node" << *node;
if (localSocket != matchingNode->getLocalSocket()) {
matchingNode->setLocalSocket(localSocket);
qDebug() << "Local socket change for node" << *matchingNode;
}
// we had this node already, do nothing for now
return node;
return matchingNode;
}
}