From 207dc993d433bd267ad74a7f0c364cb6e97f0e9f Mon Sep 17 00:00:00 2001 From: Lukas Ribisch Date: Sun, 3 Nov 2024 11:18:59 -0500 Subject: [PATCH] Fix macOS camera aspect ratio --- Cocoa/Document.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cocoa/Document.m b/Cocoa/Document.m index 1067ada..284bd3b 100644 --- a/Cocoa/Document.m +++ b/Cocoa/Document.m @@ -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);