mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-09-02 16:12:32 +02:00
fix spacing
This commit is contained in:
@@ -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.
|
||||||
|
Reference in New Issue
Block a user