SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit ffc80b2c0d475d1d9dcc18dac12dd65181c6db0d parent e0af961ad33cb786d7e3f7bc2af594d042f36876 Author: Lior Halphon <LIJI32@gmail.com> Date: Sat, 14 Jan 2023 20:09:47 +0200 Adjustments to support the 2016 iPhone SE and iPod Touch Diffstat:
| M | iOS/GBHorizontalLayout.m | 4 | ++-- |
| M | iOS/GBViewController.m | 11 | +++++++++++ |
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/iOS/GBHorizontalLayout.m b/iOS/GBHorizontalLayout.m @@ -18,9 +18,9 @@ while (true) { horizontalMargin = (resolution.width - screenRect.size.width) / 2; verticalMargin = (resolution.height - screenRect.size.height) / 2; - if (horizontalMargin / self.factor < 170) { + if (horizontalMargin / self.factor < 164) { if (self.hasFractionalPixels) { - screenRect.size.width = resolution.width - 170 * self.factor * 2; + screenRect.size.width = resolution.width - 164 * self.factor * 2; screenRect.size.height = screenRect.size.width / 160 * 144; continue; } diff --git a/iOS/GBViewController.m b/iOS/GBViewController.m @@ -159,6 +159,17 @@ static void rumbleCallback(GB_gameboy_t *gb, double amp) _backgroundView.layout = layout; } +- (UIInterfaceOrientationMask)supportedInterfaceOrientations +{ + if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) { + return UIInterfaceOrientationMaskAll; + } + if ([UIScreen mainScreen].bounds.size.height <= 568) { + return UIInterfaceOrientationMaskLandscape; + } + return UIInterfaceOrientationMaskAllButUpsideDown; +} + - (BOOL)prefersHomeIndicatorAutoHidden { UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.