diff --git a/cmake/macros/SetupHifiLibrary.cmake b/cmake/macros/SetupHifiLibrary.cmake index 04687e2c84..108786a651 100644 --- a/cmake/macros/SetupHifiLibrary.cmake +++ b/cmake/macros/SetupHifiLibrary.cmake @@ -20,7 +20,7 @@ macro(SETUP_HIFI_LIBRARY) foreach(SRC ${AVX_SRCS}) if (WIN32) set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS /arch:AVX) - elseif (APPLE OR UNIX) + elseif (APPLE OR (UNIX AND NOT ANDROID)) set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS -mavx) endif() endforeach() @@ -30,7 +30,7 @@ macro(SETUP_HIFI_LIBRARY) foreach(SRC ${AVX2_SRCS}) if (WIN32) set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS /arch:AVX2) - elseif (APPLE OR UNIX) + elseif (APPLE OR (UNIX AND NOT ANDROID)) set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS "-mavx2 -mfma") endif() endforeach() @@ -44,7 +44,7 @@ macro(SETUP_HIFI_LIBRARY) if (COMPILER_SUPPORTS_AVX512) set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS /arch:AVX512) endif() - elseif (APPLE OR UNIX) + elseif (APPLE OR (UNIX AND NOT ANDROID)) check_cxx_compiler_flag("-mavx512f" COMPILER_SUPPORTS_AVX512) if (COMPILER_SUPPORTS_AVX512) set_source_files_properties(${SRC} PROPERTIES COMPILE_FLAGS -mavx512f) diff --git a/interface/resources/controllers/keyboardMouse.json b/interface/resources/controllers/keyboardMouse.json index ff02142891..1f7ea097da 100644 --- a/interface/resources/controllers/keyboardMouse.json +++ b/interface/resources/controllers/keyboardMouse.json @@ -4,7 +4,7 @@ { "from": "Keyboard.A", "when": ["Keyboard.RightMouseButton", "!Keyboard.Control"], "to": "Actions.LATERAL_LEFT" }, { "from": "Keyboard.D", "when": ["Keyboard.RightMouseButton", "!Keyboard.Control"], "to": "Actions.LATERAL_RIGHT" }, { "from": "Keyboard.E", "when": ["!Application.CameraSelfie", "!Application.CameraLookAt", "!Keyboard.Control"], "to": "Actions.LATERAL_RIGHT" }, - { "from": "Keyboard.Q", "when": ["!Application.CameraSelfie"," !Application.CameraLookAt", "!Keyboard.Control"], "to": "Actions.LATERAL_LEFT" }, + { "from": "Keyboard.Q", "when": ["!Application.CameraSelfie", "!Application.CameraLookAt", "!Keyboard.Control"], "to": "Actions.LATERAL_LEFT" }, { "from": "Keyboard.T", "when": "!Keyboard.Control", "to": "Actions.TogglePushToTalk" }, { "comment" : "Mouse turn need to be small continuous increments", @@ -198,7 +198,7 @@ "to": "Actions.DeltaPitch", "filters": [ - { "type": "scale", "scale": 0.3 } + { "type": "scale", "scale": 0.2 } ] }, @@ -207,7 +207,7 @@ "to": "Actions.DeltaPitch", "filters": [ - { "type": "scale", "scale": 0.3 } + { "type": "scale", "scale": 0.2 } ] }, diff --git a/interface/resources/qml/hifi/tablet/+webengine/BlocksWebView.qml b/interface/resources/qml/hifi/tablet/+webengine/BlocksWebView.qml index 050515da37..e600924b42 100644 --- a/interface/resources/qml/hifi/tablet/+webengine/BlocksWebView.qml +++ b/interface/resources/qml/hifi/tablet/+webengine/BlocksWebView.qml @@ -1,6 +1,6 @@ import QtQuick 2.0 import QtWebEngine 1.5 -import "../../controls" as Controls +import "../../../controls" as Controls Controls.TabletWebView { profile: WebEngineProfile { httpUserAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36"} diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index 6f16e6e1bf..518aa4fe2c 100644 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -2709,7 +2709,11 @@ void MyAvatar::updateMotors() { if (_motionBehaviors & AVATAR_MOTION_ACTION_MOTOR_ENABLED) { if (_characterController.getState() == CharacterController::State::Hover || _characterController.computeCollisionMask() == BULLET_COLLISION_MASK_COLLISIONLESS) { - motorRotation = getMyHead()->getHeadOrientation(); + if (qApp->getCamera().getMode() == CAMERA_MODE_LOOK_AT || qApp->getCamera().getMode() == CAMERA_MODE_SELFIE) { + motorRotation = getLookAtRotation(); + } else { + motorRotation = getMyHead()->getHeadOrientation(); + } } else { // non-hovering = walking: follow camera twist about vertical but not lift // we decompose camera's rotation and store the twist part in motorRotation @@ -3632,8 +3636,7 @@ void MyAvatar::updateOrientation(float deltaTime) { glm::vec3 targetPoint = eyesPosition + glm::normalize(cameraVector); const float LOOKAT_MIX_ALPHA = 0.25f; - - if (getDriveKey(TRANSLATE_Y) == 0.0f) { + if (!isFlying() || !hasDriveInput()) { // Approximate the head's look at vector to the camera look at vector with some delay. float mixAlpha = LOOKAT_MIX_ALPHA * timeScale; if (mixAlpha > 1.0f) { diff --git a/libraries/networking/src/udt/Socket.cpp b/libraries/networking/src/udt/Socket.cpp index 7e1ab02a76..2d99f3649b 100644 --- a/libraries/networking/src/udt/Socket.cpp +++ b/libraries/networking/src/udt/Socket.cpp @@ -239,15 +239,24 @@ qint64 Socket::writeDatagram(const QByteArray& datagram, const HifiSockAddr& soc int pending = _udpSocket.bytesToWrite(); if (bytesWritten < 0 || pending) { int wsaError = 0; + static std::atomic previousWsaError (0); #ifdef WIN32 wsaError = WSAGetLastError(); #endif - qCDebug(networking) << "udt::writeDatagram (" << _udpSocket.state() << sockAddr << ") error - " << wsaError << _udpSocket.error() << "(" << _udpSocket.errorString() << ")" + QString errorString; + QDebug(&errorString) << "udt::writeDatagram (" << _udpSocket.state() << sockAddr << ") error - " + << wsaError << _udpSocket.error() << "(" << _udpSocket.errorString() << ")" << (pending ? "pending bytes:" : "pending:") << pending; + + if (previousWsaError.exchange(wsaError) != wsaError) { + qCDebug(networking).noquote() << errorString; #ifdef DEBUG_EVENT_QUEUE - int nodeListQueueSize = ::hifi::qt::getEventQueueSize(thread()); - qCDebug(networking) << "Networking queue size - " << nodeListQueueSize << "writing datagram to" << sockAddr; -#endif // DEBUG_EVENT_QUEUE + int nodeListQueueSize = ::hifi::qt::getEventQueueSize(thread()); + qCDebug(networking) << "Networking queue size - " << nodeListQueueSize << "writing datagram to" << sockAddr; +#endif // DEBUG_EVENT_QUEUE + } else { + HIFI_FCDEBUG(networking(), errorString.toLatin1().constData()); + } } return bytesWritten; @@ -525,16 +534,25 @@ std::vector Socket::getConnectionSockAddrs() { void Socket::handleSocketError(QAbstractSocket::SocketError socketError) { int wsaError = 0; + static std::atomic previousWsaError(0); #ifdef WIN32 wsaError = WSAGetLastError(); #endif int pending = _udpSocket.bytesToWrite(); - qCDebug(networking) << "udt::Socket (" << _udpSocket.state() << ") error - " << wsaError << socketError << "(" << _udpSocket.errorString() << ")" - << (pending ? "pending bytes:" : "pending:") << pending; + QString errorString; + QDebug(&errorString) << "udt::Socket (" << _udpSocket.state() << ") error - " << wsaError << socketError << + "(" << _udpSocket.errorString() << ")" << (pending ? "pending bytes:" : "pending:") + << pending; + + if (previousWsaError.exchange(wsaError) != wsaError) { + qCDebug(networking).noquote() << errorString; #ifdef DEBUG_EVENT_QUEUE - int nodeListQueueSize = ::hifi::qt::getEventQueueSize(thread()); - qCDebug(networking) << "Networking queue size - " << nodeListQueueSize; -#endif // DEBUG_EVENT_QUEUE + int nodeListQueueSize = ::hifi::qt::getEventQueueSize(thread()); + qCDebug(networking) << "Networking queue size - " << nodeListQueueSize; +#endif // DEBUG_EVENT_QUEUE + } else { + HIFI_FCDEBUG(networking(), errorString.toLatin1().constData()); + } } void Socket::handleStateChanged(QAbstractSocket::SocketState socketState) { diff --git a/libraries/ui/src/ui/TabletScriptingInterface.h b/libraries/ui/src/ui/TabletScriptingInterface.h index bae5eda29e..58596d6d92 100644 --- a/libraries/ui/src/ui/TabletScriptingInterface.h +++ b/libraries/ui/src/ui/TabletScriptingInterface.h @@ -279,6 +279,7 @@ public: * @param {string} [injectedJavaScriptUrl=""] - The URL of JavaScript to inject into the web page. * @param {boolean} [loadOtherBase=false] - If true, the web page or app is displayed in a frame with "back" * and "close" buttons. + *

Deprecated: This parameter is deprecated and will be removed.

*/ Q_INVOKABLE void gotoWebScreen(const QString& url); Q_INVOKABLE void gotoWebScreen(const QString& url, const QString& injectedJavaScriptUrl, bool loadOtherBase = false); diff --git a/unpublishedScripts/marketplace/blocks/blocksApp.js b/unpublishedScripts/marketplace/blocks/blocksApp.js index 813a77c74a..9c10ba8197 100644 --- a/unpublishedScripts/marketplace/blocks/blocksApp.js +++ b/unpublishedScripts/marketplace/blocks/blocksApp.js @@ -35,7 +35,7 @@ function onClicked() { if (!shown) { - tablet.gotoWebScreen(APP_URL, "", true); + tablet.gotoWebScreen(APP_URL, ""); } else { tablet.gotoHomeScreen(); }