Skip to content
Permalink
Browse files

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.
  • Loading branch information
slouken committed Sep 29, 2016
1 parent 5f2e83a commit f369d165fad6751275ce45f9ff0f8147f43120d1
Showing with 1 addition and 1 deletion.
  1. +1 −1 android-project/src/org/libsdl/app/SDLActivity.java
@@ -1395,7 +1395,7 @@ public void onSensorChanged(SensorEvent event) {
}
SDLActivity.onNativeAccel(-x / SensorManager.GRAVITY_EARTH,
y / SensorManager.GRAVITY_EARTH,
event.values[2] / SensorManager.GRAVITY_EARTH - 1);
event.values[2] / SensorManager.GRAVITY_EARTH);
}
}
}

0 comments on commit f369d16

Please sign in to comment.