From 3701e160aeebb3d676ac872c526009a86354a8b7 Mon Sep 17 00:00:00 2001 From: dthian Date: Wed, 19 Aug 2020 17:00:23 -0700 Subject: [PATCH] Update Code Samples --- android/app/src/main/cpp/VROSceneRendererOVR.cpp | 6 ++++-- code-samples/virocore-helloworld-vr/app/build.gradle | 10 +++++----- .../app/src/main/AndroidManifest.xml | 6 ++++++ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/android/app/src/main/cpp/VROSceneRendererOVR.cpp b/android/app/src/main/cpp/VROSceneRendererOVR.cpp index 24276b1..b38081d 100755 --- a/android/app/src/main/cpp/VROSceneRendererOVR.cpp +++ b/android/app/src/main/cpp/VROSceneRendererOVR.cpp @@ -123,8 +123,8 @@ typedef void(GL_APIENTRY* PFNGLFRAMEBUFFERTEXTUREMULTISAMPLEMULTIVIEWOVRPROC)( static const int CPU_LEVEL = 2; static const int GPU_LEVEL = 3; static const int NUM_MULTI_SAMPLES = 4; -const unsigned int ControllerRightId = 536870914; -const unsigned int ControllerLeftId = 536870915; +const uint32_t ControllerRightId = 536870914; +const uint32_t ControllerLeftId = 536870915; /* ================================================================================ @@ -1023,6 +1023,8 @@ static void ovrApp_HandleInput(ovrApp* app, double predictedDisplayTime, snapShot.deviceID = ViroOculusInputEvent::ControllerRightId; } else if (ControllerLeftId == cap.DeviceID) { snapShot.deviceID = ViroOculusInputEvent::ControllerLeftId; + } else { + return; } snapShot.batteryPercentage = trackedRemoteState.BatteryPercentRemaining; diff --git a/code-samples/virocore-helloworld-vr/app/build.gradle b/code-samples/virocore-helloworld-vr/app/build.gradle index fc39560..0251acf 100644 --- a/code-samples/virocore-helloworld-vr/app/build.gradle +++ b/code-samples/virocore-helloworld-vr/app/build.gradle @@ -1,16 +1,16 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 25 + compileSdkVersion 28 defaultConfig { applicationId "com.example.virosample" minSdkVersion 21 - targetSdkVersion 25 + targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" ndk { - abiFilters "armeabi-v7a", "x86", "armeabi", "mips" + abiFilters "arm64-v8a" } } buildTypes { @@ -32,8 +32,8 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'com.android.support:appcompat-v7:25.0.0' - implementation 'com.google.android.exoplayer:exoplayer:r2.2.0' + implementation 'com.android.support:appcompat-v7:28.0.0' + implementation 'com.google.android.exoplayer:exoplayer:2.7.1' androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) diff --git a/code-samples/virocore-helloworld-vr/app/src/main/AndroidManifest.xml b/code-samples/virocore-helloworld-vr/app/src/main/AndroidManifest.xml index 4261109..39fa9b5 100644 --- a/code-samples/virocore-helloworld-vr/app/src/main/AndroidManifest.xml +++ b/code-samples/virocore-helloworld-vr/app/src/main/AndroidManifest.xml @@ -4,10 +4,16 @@ + +