Fixed accelerometer reverting X and Y coordinates
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
|
||||
package org.enigmagame.enigma;
|
||||
package de.schwardtnet.alienblaster;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
@@ -48,10 +48,7 @@ class AccelerometerReader implements SensorEventListener {
|
||||
if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER)
|
||||
{
|
||||
if( Globals.HorizontalOrientation )
|
||||
// TODO: it feels better for me to use tilt as X value instead of intuitive horizontal phone orientation
|
||||
// because then I can hold device comfortably, we need another user-configurable option for that
|
||||
// nativeOrientation(event.values[1], -event.values[2], event.values[0]); // Comfortable setting
|
||||
nativeAccelerometer(-event.values[1], -event.values[0], event.values[2]); // Intuitive setting
|
||||
nativeAccelerometer(event.values[1], -event.values[0], event.values[2]);
|
||||
else
|
||||
nativeAccelerometer(event.values[0], event.values[1], event.values[2]); // TODO: not tested!
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user