Reapply "Revert orientation tracking on the camera image"

This reverts commit c0bab85d63.
This commit is contained in:
Ole-Morten Duesund 2026-05-11 15:57:32 +02:00
commit b0691adfa3
7 changed files with 55 additions and 171 deletions

View file

@ -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 {