Various fixes

This commit is contained in:
Ilya Laktyushin 2023-07-07 03:28:17 +02:00
parent eb07ea17e7
commit e6e7d52ebf
2 changed files with 5 additions and 5 deletions

View File

@ -82,11 +82,11 @@ final class CameraDeviceContext {
private var preferredMaxDimensions: CMVideoDimensions {
if self.additional {
if case .iPhoneXS = DeviceModel.current {
//if case .iPhoneXS = DeviceModel.current {
return CMVideoDimensions(width: 1440, height: 1080)
} else {
return CMVideoDimensions(width: 1920, height: 1440)
}
//} else {
// return CMVideoDimensions(width: 1920, height: 1440)
//}
} else {
return CMVideoDimensions(width: 1920, height: 1080)
}

View File

@ -108,7 +108,7 @@ final class CameraDevice {
var bestFormat: AVCaptureDevice.Format?
outer: for format in candidates {
for range in format.videoSupportedFrameRateRanges {
if range.maxFrameRate > 60 {
if range.maxFrameRate > maxFramerate {
continue outer
}
bestFormat = format