fix #230, properly handle images captured with the front camera

This commit is contained in:
tibbi
2019-09-03 09:16:38 +02:00
parent b793026bbb
commit 715fc4f79a
3 changed files with 5 additions and 6 deletions

View File

@ -38,9 +38,8 @@ const val STATE_STARTING_RECORDING = 6
const val STATE_STOPING_RECORDING = 7
const val STATE_RECORDING = 8
fun compensateDeviceRotation(orientation: Int, isUsingFrontCamera: Boolean) = when {
orientation == ORIENT_LANDSCAPE_LEFT -> 270
orientation == ORIENT_LANDSCAPE_RIGHT -> 90
isUsingFrontCamera -> 180
fun compensateDeviceRotation(orientation: Int) = when (orientation) {
ORIENT_LANDSCAPE_LEFT -> 270
ORIENT_LANDSCAPE_RIGHT -> 90
else -> 0
}