fix spacing

This commit is contained in:
Cal Moody
2024-06-25 22:31:47 -04:00
parent 25576899d8
commit 5c21c5e985

View File

@@ -253,15 +253,15 @@ static void rumbleCallback(GB_gameboy_t *gb, double amp)
if (@available(iOS 13.0, *)) { if (@available(iOS 13.0, *)) {
// AVCaptureDeviceTypeBuiltInUltraWideCamera is only available in iOS 13+ // AVCaptureDeviceTypeBuiltInUltraWideCamera is only available in iOS 13+
deviceTypes = @[AVCaptureDeviceTypeBuiltInWideAngleCamera, deviceTypes = @[AVCaptureDeviceTypeBuiltInWideAngleCamera,
AVCaptureDeviceTypeBuiltInUltraWideCamera, AVCaptureDeviceTypeBuiltInUltraWideCamera,
AVCaptureDeviceTypeBuiltInTelephotoCamera]; AVCaptureDeviceTypeBuiltInTelephotoCamera];
} }
// Use a discovery session to gather the capture devices (all back cameras as well as the front camera) // Use a discovery session to gather the capture devices (all back cameras as well as the front camera)
AVCaptureDeviceDiscoverySession *cameraDiscoverySession = [AVCaptureDeviceDiscoverySession AVCaptureDeviceDiscoverySession *cameraDiscoverySession = [AVCaptureDeviceDiscoverySession
discoverySessionWithDeviceTypes:deviceTypes discoverySessionWithDeviceTypes:deviceTypes
mediaType:AVMediaTypeVideo mediaType:AVMediaTypeVideo
position:AVCaptureDevicePositionUnspecified]; position:AVCaptureDevicePositionUnspecified];
_allCaptureDevices = cameraDiscoverySession.devices; _allCaptureDevices = cameraDiscoverySession.devices;
// Filter only the back cameras into a list used for switching between them // Filter only the back cameras into a list used for switching between them
@@ -301,19 +301,19 @@ static void rumbleCallback(GB_gameboy_t *gb, double amp)
UIImage *selectCameraImage = [[UIImage imageNamed:@"CameraTemplate"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; UIImage *selectCameraImage = [[UIImage imageNamed:@"CameraTemplate"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
[_changeCameraButton setImage:selectCameraImage [_changeCameraButton setImage:selectCameraImage
forState:UIControlStateNormal]; forState:UIControlStateNormal];
_changeCameraButton.backgroundColor = [UIColor whiteColor]; _changeCameraButton.backgroundColor = [UIColor whiteColor];
} }
_cameraPositionButton.layer.cornerRadius = 6; _cameraPositionButton.layer.cornerRadius = 6;
_cameraPositionButton.alpha = 0; _cameraPositionButton.alpha = 0;
[_cameraPositionButton addTarget:self [_cameraPositionButton addTarget:self
action:@selector(rotateCamera) action:@selector(rotateCamera)
forControlEvents:UIControlEventTouchUpInside]; forControlEvents:UIControlEventTouchUpInside];
_changeCameraButton.layer.cornerRadius = 6; _changeCameraButton.layer.cornerRadius = 6;
_changeCameraButton.alpha = 0; _changeCameraButton.alpha = 0;
[_changeCameraButton addTarget:self [_changeCameraButton addTarget:self
action:@selector(changeCamera) action:@selector(changeCamera)
forControlEvents:UIControlEventTouchUpInside]; forControlEvents:UIControlEventTouchUpInside];
[_backgroundView addSubview:_cameraPositionButton]; [_backgroundView addSubview:_cameraPositionButton];
// Only show the select camera button if we have more than one back camera to swap between. // Only show the select camera button if we have more than one back camera to swap between.