disable the use of the accelerometer on android, we don't use it and it only drains the battery
authorXeli
Thu, 09 Feb 2012 19:59:57 +0100
changeset 6661 d16c898d1fe2
parent 6660 99ecc7e17c4f
child 6662 f86a3ccd19c0
disable the use of the accelerometer on android, we don't use it and it only drains the battery
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/SDLActivity.java
--- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/SDLActivity.java	Thu Feb 09 19:06:43 2012 +0100
+++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/SDLActivity.java	Thu Feb 09 19:59:57 2012 +0100
@@ -481,14 +481,14 @@
 		Log.v("SDL", "surfaceCreated()");
 		holder.setType(SurfaceHolder.SURFACE_TYPE_GPU);
 		SDLActivity.createEGLSurface();
-		enableSensor(Sensor.TYPE_ACCELEROMETER, true);
+//		enableSensor(Sensor.TYPE_ACCELEROMETER, true);
 	}
 
 	// Called when we lose the surface
 	public void surfaceDestroyed(SurfaceHolder holder) {
 		Log.v("SDL", "surfaceDestroyed()");
 		SDLActivity.nativePause();
-		enableSensor(Sensor.TYPE_ACCELEROMETER, false);
+//		enableSensor(Sensor.TYPE_ACCELEROMETER, false);
 	}
 
 	// Called when the surface is resized