[Accessibility] Handle adapter activation/deactivation.

This commit is contained in:
Pāvels Nadtočajevs
2026-01-29 09:02:10 +02:00
parent 8db94f7b5e
commit 876dcc8a5d
7 changed files with 140 additions and 4 deletions
+14
View File
@@ -63,8 +63,22 @@
width[1] = 0;
height[1] = 0;
#ifdef APPLE_EMBEDDED_ENABLED
[p_device lockForConfiguration:&error];
[p_device setFocusMode:AVCaptureFocusModeLocked];
[p_device setExposureMode:AVCaptureExposureModeLocked];
[p_device setWhiteBalanceMode:AVCaptureWhiteBalanceModeLocked];
[p_device unlockForConfiguration];
#endif // APPLE_EMBEDDED_ENABLED
[self beginConfiguration];
#ifdef APPLE_EMBEDDED_ENABLED
self.sessionPreset = AVCaptureSessionPreset1280x720;
#endif // APPLE_EMBEDDED_ENABLED
input = [AVCaptureDeviceInput deviceInputWithDevice:p_device error:&error];
if (!input) {
print_line("Couldn't get input device for camera");