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