Skip to content

Commit

Permalink
Fixed bug 3427 - Android accelerometer z-axis incorrect
Browse files Browse the repository at this point in the history
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 f369d16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion android-project/src/org/libsdl/app/SDLActivity.java
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit f369d16

Please sign in to comment.