Showing the changes to interface/src/Application.cpp (1 of 26 files). Show all
Unified · Split
| @@ -210,7 +210,7 @@ · 209 unmodified lines | |||
| 210 | #include "commerce/QmlCommerce.h" | 210 | #include "commerce/QmlCommerce.h" |
| 211 | 211 | ||
| 212 | #include "webbrowser/WebBrowserSuggestionsEngine.h" | 212 | #include "webbrowser/WebBrowserSuggestionsEngine.h" |
| 213 | #ifdef ANDROID | 213 | #if defined(Q_OS_ANDROID) |
| 214 | #include <QtAndroidExtras/QAndroidJniObject> | 214 | #include <QtAndroidExtras/QAndroidJniObject> |
| 215 | #include <android/log.h> | 215 | #include <android/log.h> |
| 216 | #endif | 216 | #endif |
| @@ -235,7 +235,7 @@ extern "C" { · 18 unmodified lines | |||
| 235 | } | 235 | } |
| 236 | #endif | 236 | #endif |
| 237 | 237 | ||
| 238 | #ifdef ANDROID | 238 | #if defined(Q_OS_ANDROID) |
| 239 | extern "C" { | 239 | extern "C" { |
| 240 | 240 | ||
| 241 | JNIEXPORT void Java_io_highfidelity_hifiinterface_InterfaceActivity_nativeOnCreate(JNIEnv* env, jobject obj, jobject instance, jobject asset_mgr) { | 241 | JNIEXPORT void Java_io_highfidelity_hifiinterface_InterfaceActivity_nativeOnCreate(JNIEnv* env, jobject obj, jobject instance, jobject asset_mgr) { |
| @@ -557,16 +557,9 @@ void messageHandler(QtMsgType type, const QMessageLogContext& context, const QSt · 315 unmodified lines | |||
| 557 | if (!logMessage.isEmpty()) { | 557 | if (!logMessage.isEmpty()) { |
| 558 | #ifdef Q_OS_WIN | 558 | #ifdef Q_OS_WIN |
| 559 | OutputDebugStringA(logMessage.toLocal8Bit().constData()); | 559 | OutputDebugStringA(logMessage.toLocal8Bit().constData()); |
| 560 | OutputDebugStringA("\n");i | 560 | OutputDebugStringA("\n"); |
| 561 | #elif defined Q_OS_ANDROID | 561 | #elif defined Q_OS_ANDROID |
| 562 | QString report=message; | 562 | const char * local=logMessage.toStdString().c_str(); |
| 563 | if (context.file && !QString(context.file).isEmpty()) { | ||
| 564 | report+=" at "; | ||
| 565 | report+=QString(context.file); | ||
| 566 | report+=" : "; | ||
| 567 | report+=QString::number(context.line); | ||
| 568 | } | ||
| 569 | const char*const local=report.toLocal8Bit().constData(); | ||
| 570 | switch (type) { | 563 | switch (type) { |
| 571 | case QtDebugMsg: | 564 | case QtDebugMsg: |
| 572 | __android_log_write(ANDROID_LOG_DEBUG,"Interface",local); | 565 | __android_log_write(ANDROID_LOG_DEBUG,"Interface",local); |
| @@ -2252,10 +2245,10 @@ void Application::initializeGL() { · 1679 unmodified lines | |||
| 2252 | // Set up the render engine | 2245 | // Set up the render engine |
| 2253 | render::CullFunctor cullFunctor = LODManager::shouldRender; | 2246 | render::CullFunctor cullFunctor = LODManager::shouldRender; |
| 2254 | static const QString RENDER_FORWARD = "HIFI_RENDER_FORWARD"; | 2247 | static const QString RENDER_FORWARD = "HIFI_RENDER_FORWARD"; |
| 2255 | #ifndef Q_OS_ANDROID | 2248 | #ifdef Q_OS_ANDROID |
| 2256 | bool isDeferred = !QProcessEnvironment::systemEnvironment().contains(RENDER_FORWARD); | ||
| 2257 | #else | ||
| 2258 | bool isDeferred = false; | 2249 | bool isDeferred = false; |
| 2250 | #else | ||
| 2251 | bool isDeferred = !QProcessEnvironment::systemEnvironment().contains(RENDER_FORWARD); | ||
| 2259 | #endif | 2252 | #endif |
| 2260 | _renderEngine->addJob<UpdateSceneTask>("UpdateScene"); | 2253 | _renderEngine->addJob<UpdateSceneTask>("UpdateScene"); |
| 2261 | #ifndef Q_OS_ANDROID | 2254 | #ifndef Q_OS_ANDROID |
| @@ -2369,10 +2362,10 @@ void Application::initializeUi() { · 107 unmodified lines | |||
| 2369 | offscreenUi->setProxyWindow(_window->windowHandle()); | 2362 | offscreenUi->setProxyWindow(_window->windowHandle()); |
| 2370 | // OffscreenUi is a subclass of OffscreenQmlSurface specifically designed to | 2363 | // OffscreenUi is a subclass of OffscreenQmlSurface specifically designed to |
| 2371 | // support the window management and scripting proxies for VR use | 2364 | // support the window management and scripting proxies for VR use |
| 2372 | #ifndef Q_OS_ANDROID | 2365 | #ifdef Q_OS_ANDROID |
| 2373 | offscreenUi->createDesktop(QString("hifi/Desktop.qml")); | 2366 | offscreenUi->createDesktop(PathUtils::qmlBasePath() + "hifi/Desktop.qml"); |
| 2374 | #else | 2367 | #else |
| 2375 | offscreenUi->createDesktop(QString("qrc:///qml/hifi/Desktop.qml")); | 2368 | offscreenUi->createDesktop(QString("hifi/Desktop.qml")); |
| 2376 | #endif | 2369 | #endif |
| 2377 | // FIXME either expose so that dialogs can set this themselves or | 2370 | // FIXME either expose so that dialogs can set this themselves or |
| 2378 | // do better detection in the offscreen UI of what has focus | 2371 | // do better detection in the offscreen UI of what has focus |
| @@ -5960,7 +5953,7 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEnginePointe · 3581 unmodified lines | |||
| 5960 | scriptEngine->registerGetterSetter("location", LocationScriptingInterface::locationGetter, | 5953 | scriptEngine->registerGetterSetter("location", LocationScriptingInterface::locationGetter, |
| 5961 | LocationScriptingInterface::locationSetter); | 5954 | LocationScriptingInterface::locationSetter); |
| 5962 | 5955 | ||
| 5963 | #ifndef ANDROID | 5956 | #if !defined(Q_OS_ANDROID) |
| 5964 | scriptEngine->registerFunction("OverlayWebWindow", QmlWebWindowClass::constructor); | 5957 | scriptEngine->registerFunction("OverlayWebWindow", QmlWebWindowClass::constructor); |
| 5965 | #endif | 5958 | #endif |
| 5966 | scriptEngine->registerFunction("OverlayWindow", QmlWindowClass::constructor); | 5959 | scriptEngine->registerFunction("OverlayWindow", QmlWindowClass::constructor); |