mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-06-27 09:02:59 +02:00
fix #230, properly handle images captured with the front camera
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user