Fixed bug 3427 - Android accelerometer z-axis incorrect
Alex Szpakowski As seen here https://bitbucket.org/rude/love/issues/1202/accelerometer-z-axis , the Java code for sending accelerometer data to SDL's C code has an incorrect Z-axis calculation.
parent
5f2e83a955
commit
f369d165fa
|
@ -1395,7 +1395,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||||
}
|
}
|
||||||
SDLActivity.onNativeAccel(-x / SensorManager.GRAVITY_EARTH,
|
SDLActivity.onNativeAccel(-x / SensorManager.GRAVITY_EARTH,
|
||||||
y / SensorManager.GRAVITY_EARTH,
|
y / SensorManager.GRAVITY_EARTH,
|
||||||
event.values[2] / SensorManager.GRAVITY_EARTH - 1);
|
event.values[2] / SensorManager.GRAVITY_EARTH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue