Fix Android sensors polling rate on resume

Fix #5306
This commit is contained in:
George Marques 2016-06-24 21:00:04 -03:00
parent 22c9a44174
commit 6d37253be5
No known key found for this signature in database
GPG key ID: 046BD46A3201E43D

View file

@ -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();