Merge pull request #668 from lxgr/lxgr/fix-camera-aspect

Fix macOS camera aspect ratio
This commit is contained in:
Lior Halphon
2024-11-03 22:30:14 +02:00
committed by GitHub

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);