git.y1.nz

SameBoy

Accurate GB/GBC emulator
download: https://git.y1.nz/archives/sameboy.tar.gz
README | Files | Log | Refs | LICENSE

commit be63d7eaa38439a1ee17d4c499cb95d15e3eda7f
parent 15588a065f80e6819d687ecca7aef8cfa3e1bac5
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Sat, 28 Jun 2025 15:11:45 +0300

Revert this hack, broken on iPhones. Maybe Apple will fix this regression eventually (lulz no)

Diffstat:
MiOS/GBLayout.m2+-
MiOS/GBMenuViewController.m5+----
2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/iOS/GBLayout.m b/iOS/GBLayout.m @@ -1,7 +1,7 @@ #define GBLayoutInternal #import "GBLayout.h" -double StatusBarHeight(void) +static double StatusBarHeight(void) { static double ret = 0; static dispatch_once_t onceToken; diff --git a/iOS/GBMenuViewController.m b/iOS/GBMenuViewController.m @@ -30,7 +30,6 @@ static NSString *const tips[] = { UILabel *_tipLabel; UIVisualEffectView *_effectView; NSMutableArray<UIButton *> *_buttons; - unsigned _superviewTopInset; } + (instancetype)menu @@ -153,10 +152,8 @@ static NSString *const tips[] = { limitedToNumberOfLines:3].size; size.width = ceil(size.width); _tipLabel.frame = (CGRect){{8, 8}, size}; - // Weird iOS bug where the inset reports as 0 after some rotations, use the helper function from GBLayout - extern double StatusBarHeight(void); _effectView.frame = (CGRect) { - {round((outerSize.width - size.width - 16) / 2), StatusBarHeight() + 12}, + {round((outerSize.width - size.width - 16) / 2), view.window.safeAreaInsets.top + 12}, {size.width + 16, size.height + 16} }; }

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.