Reapply "Revert orientation tracking on the camera image"
This reverts commit c0bab85d63.
This commit is contained in:
parent
dd4471c7d2
commit
b0691adfa3
7 changed files with 55 additions and 171 deletions
|
|
@ -112,7 +112,6 @@ fun CameraScreen(
|
|||
val isFrontCamera by viewModel.cameraManager.isFrontCamera.collectAsState()
|
||||
val previewResolution by viewModel.cameraManager.previewResolution.collectAsState()
|
||||
val cameraError by viewModel.cameraManager.error.collectAsState()
|
||||
val currentRotation by viewModel.currentRotation.collectAsState()
|
||||
|
||||
// Gallery picker
|
||||
val galleryLauncher = rememberLauncherForActivityResult(
|
||||
|
|
@ -165,13 +164,6 @@ fun CameraScreen(
|
|||
}
|
||||
}
|
||||
|
||||
// Forward device rotation to renderer (aspect math) and CameraX (target rotation)
|
||||
LaunchedEffect(currentRotation, renderer) {
|
||||
renderer?.setDisplayRotation(currentRotation)
|
||||
viewModel.cameraManager.setTargetRotation(currentRotation)
|
||||
glSurfaceView?.requestRender()
|
||||
}
|
||||
|
||||
// Start camera when surface texture is available
|
||||
LaunchedEffect(surfaceTexture) {
|
||||
surfaceTexture?.let {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue