SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 7cf082bcc4e6d1554a87835b5f15d76f124eab0b parent cdb0c56b1dde4f7bc110abbdd157f10bf5527e3e Author: Lior Halphon <LIJI32@gmail.com> Date: Thu, 29 Jan 2026 00:01:26 +0200 Fix Camera support in certain iPhone models, fixes #736 Diffstat:
| M | iOS/GBViewController.m | 8 | +++++++- |
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/iOS/GBViewController.m b/iOS/GBViewController.m @@ -1998,7 +1998,12 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response _cameraSession = [AVCaptureSession new]; - _cameraSession.sessionPreset = AVCaptureSessionPreset352x288; + if ([device supportsAVCaptureSessionPreset:AVCaptureSessionPreset352x288]) { + _cameraSession.sessionPreset = AVCaptureSessionPreset352x288; + } + else if ([device supportsAVCaptureSessionPreset:AVCaptureSessionPresetMedium]) { + _cameraSession.sessionPreset = AVCaptureSessionPresetMedium; + } [_cameraSession addInput: input]; [_cameraSession addOutput: _cameraOutput]; @@ -2010,6 +2015,7 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response @catch (NSException *exception) { /* I have not tested camera support on many devices, so we catch exceptions just in case. */ GB_camera_updated(&_gb); + _cameraSession = nil; } }); }
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.