diff --git a/iOS/GBPrinterFeedController.m b/iOS/GBPrinterFeedController.m index 603cfd5e..abb855aa 100644 --- a/iOS/GBPrinterFeedController.m +++ b/iOS/GBPrinterFeedController.m @@ -9,6 +9,7 @@ - (instancetype)initWithImage:(UIImage *)image { + self = [super init]; _image = image; UIViewController *scrollViewController = [[UIViewController alloc] init]; scrollViewController.title = @"Printer Feed"; diff --git a/iOS/GBViewController.m b/iOS/GBViewController.m index 92c5c977..fd6d7556 100644 --- a/iOS/GBViewController.m +++ b/iOS/GBViewController.m @@ -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,