Showing the changes to interface/src/Application.cpp (1 of 100 files). Show all
Unified · Split
| @@ -58,7 +58,7 @@ · 57 unmodified lines | |||
| 58 | #include <HFActionEvent.h> | 58 | #include <HFActionEvent.h> |
| 59 | #include <HFBackEvent.h> | 59 | #include <HFBackEvent.h> |
| 60 | #include <LocalVoxelsList.h> | 60 | #include <LocalVoxelsList.h> |
| 61 | #include <Logging.h> | 61 | #include <LogHandler.h> |
| 62 | #include <NetworkAccessManager.h> | 62 | #include <NetworkAccessManager.h> |
| 63 | #include <OctalCode.h> | 63 | #include <OctalCode.h> |
| 64 | #include <OctreeSceneStats.h> | 64 | #include <OctreeSceneStats.h> |
| @@ -117,12 +117,10 @@ const QString SKIP_FILENAME = QStandardPaths::writableLocation(QStandardPaths::D · 52 unmodified lines | |||
| 117 | const QString DEFAULT_SCRIPTS_JS_URL = "http://public.highfidelity.io/scripts/defaultScripts.js"; | 117 | const QString DEFAULT_SCRIPTS_JS_URL = "http://public.highfidelity.io/scripts/defaultScripts.js"; |
| 118 | 118 | ||
| 119 | void messageHandler(QtMsgType type, const QMessageLogContext& context, const QString& message) { | 119 | void messageHandler(QtMsgType type, const QMessageLogContext& context, const QString& message) { |
| 120 | if (message.size() > 0) { | 120 | QString logMessage = LogHandler::getInstance().printMessage((LogMsgType) type, context, message); |
| 121 | QString dateString = QDateTime::currentDateTime().toTimeSpec(Qt::LocalTime).toString(Qt::ISODate); | 121 | |
| 122 | QString formattedMessage = QString("[%1] %2\n").arg(dateString).arg(message); | 122 | if (!logMessage.isEmpty()) { |
| 123 | 123 | Application::getInstance()->getLogger()->addMessage(qPrintable(logMessage)); | |
| 124 | fprintf(stdout, "%s", qPrintable(formattedMessage)); | ||
| 125 | Application::getInstance()->getLogger()->addMessage(qPrintable(formattedMessage)); | ||
| 126 | } | 124 | } |
| 127 | } | 125 | } |
| 128 | 126 | ||
| @@ -582,10 +580,6 @@ void Application::initializeGL() { · 453 unmodified lines | |||
| 582 | float startupTime = (float)_applicationStartupTime.elapsed() / 1000.0; | 580 | float startupTime = (float)_applicationStartupTime.elapsed() / 1000.0; |
| 583 | _justStarted = false; | 581 | _justStarted = false; |
| 584 | qDebug("Startup time: %4.2f seconds.", startupTime); | 582 | qDebug("Startup time: %4.2f seconds.", startupTime); |
| 585 | const char LOGSTASH_INTERFACE_START_TIME_KEY[] = "interface-start-time"; | ||
| 586 | |||
| 587 | // ask the Logstash class to record the startup time | ||
| 588 | Logging::stashValue(STAT_TYPE_TIMER, LOGSTASH_INTERFACE_START_TIME_KEY, startupTime); | ||
| 589 | } | 583 | } |
| 590 | 584 | ||
| 591 | // update before the first render | 585 | // update before the first render |
| @@ -3179,7 +3173,7 @@ void Application::renderRearViewMirror(const QRect& region, bool billboard) { · 2587 unmodified lines | |||
| 3179 | } else { | 3173 | } else { |
| 3180 | // if not rendering the billboard, the region is in device independent coordinates; must convert to device | 3174 | // if not rendering the billboard, the region is in device independent coordinates; must convert to device |
| 3181 | QSize size = getTextureCache()->getFrameBufferSize(); | 3175 | QSize size = getTextureCache()->getFrameBufferSize(); |
| 3182 | float ratio = QApplication::desktop()->windowHandle()->devicePixelRatio(); | 3176 | float ratio = QApplication::desktop()->windowHandle()->devicePixelRatio() * _renderResolutionScale; |
| 3183 | int x = region.x() * ratio, y = region.y() * ratio, width = region.width() * ratio, height = region.height() * ratio; | 3177 | int x = region.x() * ratio, y = region.y() * ratio, width = region.width() * ratio, height = region.height() * ratio; |
| 3184 | glViewport(x, size.height() - y - height, width, height); | 3178 | glViewport(x, size.height() - y - height, width, height); |
| 3185 | glScissor(x, size.height() - y - height, width, height); | 3179 | glScissor(x, size.height() - y - height, width, height); |