Fix macOS camera aspect ratio

This commit is contained in:
Lukas Ribisch 2024-11-03 11:18:59 -05:00
parent 52d5169cc8
commit 207dc993d4
1 changed files with 1 additions and 1 deletions

View File

@ -2067,7 +2067,7 @@ enum GBWindowResizeAction
NSError *error;
AVCaptureDevice *device = [AVCaptureDevice defaultDeviceWithMediaType: AVMediaTypeVideo];
AVCaptureDeviceInput *input = [AVCaptureDeviceInput deviceInputWithDevice: device error: &error];
CMVideoDimensions dimensions = CMVideoFormatDescriptionGetDimensions([[[device formats] lastObject] formatDescription]);
CMVideoDimensions dimensions = CMVideoFormatDescriptionGetDimensions([[device activeFormat] formatDescription]);
if (!input) {
GB_camera_updated(&_gb);