mirror of
https://github.com/LIJI32/SameBoy.git
synced 2026-10-11 22:19:50 +00:00
Fix printer emulation and UI on iOS 27, closes #779
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
|
||||
- (instancetype)initWithImage:(UIImage *)image
|
||||
{
|
||||
self = [super init];
|
||||
_image = image;
|
||||
UIViewController *scrollViewController = [[UIViewController alloc] init];
|
||||
scrollViewController.title = @"Printer Feed";
|
||||
|
||||
+11
-1
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user