From 6d37253be5657844171413c2fbb164a1a9e7ee9a Mon Sep 17 00:00:00 2001 From: George Marques Date: Fri, 24 Jun 2016 21:00:04 -0300 Subject: [PATCH] Fix Android sensors polling rate on resume Fix #5306 --- platform/android/java/src/org/godotengine/godot/Godot.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/android/java/src/org/godotengine/godot/Godot.java b/platform/android/java/src/org/godotengine/godot/Godot.java index cdf17e31610..4c0f4878f52 100644 --- a/platform/android/java/src/org/godotengine/godot/Godot.java +++ b/platform/android/java/src/org/godotengine/godot/Godot.java @@ -602,8 +602,8 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC } mView.onResume(); - mSensorManager.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_NORMAL); - mSensorManager.registerListener(this, mMagnetometer, SensorManager.SENSOR_DELAY_NORMAL); + mSensorManager.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_GAME); + mSensorManager.registerListener(this, mMagnetometer, SensorManager.SENSOR_DELAY_GAME); GodotLib.focusin(); if(use_immersive && Build.VERSION.SDK_INT >= 19.0){ // check if the application runs on an android 4.4+ Window window = getWindow();