Fix printer emulation and UI on iOS 27, closes #779

This commit is contained in:
Lior Halphon
2026-10-10 21:13:11 +03:00
parent 98da08c311
commit 6446ef2b01
2 changed files with 12 additions and 1 deletions
+1
View File
@@ -9,6 +9,7 @@
- (instancetype)initWithImage:(UIImage *)image
{
self = [super init];
_image = image;
UIViewController *scrollViewController = [[UIViewController alloc] init];
scrollViewController.title = @"Printer Feed";
+11 -1
View File
@@ -436,7 +436,6 @@ static void rumbleCallback(GB_gameboy_t *gb, double amp)
}
_cameraPositionButton = [[UIButton alloc] init];
[self didRotateFromInterfaceOrientation:CurrentOrientation()];
if (@available(iOS 13.0, *)) {
[_cameraPositionButton setImage:[UIImage systemImageNamed:@"camera.rotate"
withConfiguration:[UIImageSymbolConfiguration configurationWithScale:UIImageSymbolScaleLarge]]
@@ -1074,6 +1073,7 @@ static void rumbleCallback(GB_gameboy_t *gb, double amp)
if (_lastHingeStatus != _hinge.status) {
[self recreateLayoutsWithThemeNamed:[[NSUserDefaults standardUserDefaults] stringForKey:@"GBInterfaceTheme"]];
[[NSNotificationCenter defaultCenter] postNotificationName:@"HingeStatusChanged" object:nil];
[self didRotateFromInterfaceOrientation:UIInterfaceOrientationUnknown];
}
[self start];
}
@@ -1343,6 +1343,16 @@ static void rumbleCallback(GB_gameboy_t *gb, double amp)
landscape = false;
}
if (@available(iOS 27.1, *)) {
if (_lastHingeStatus == UIHingeStatusClosed) {
insets.left = insets.right = MIN(insets.left, insets.right);
landscape = false;
if (_orientation == UIInterfaceOrientationLandscapeLeft) {
insets.bottom += 24;
}
}
}
_cameraPositionButton.frame = CGRectMake(insets.left + 8,
_backgroundView.bounds.size.height - 8 - insets.bottom - 32,
32,