SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 1fde385cd7139b6595a8db94aff559a6a682a102 parent d32bff58a432888ba0b519e71029dd2cac0354e1 Author: Lior Halphon <LIJI32@gmail.com> Date: Thu, 19 Jan 2023 01:19:30 +0200 Visual improvements Diffstat:
| M | iOS/GBAboutController.m | 1 | + |
| M | iOS/GBLoadROMTableViewController.m | 28 | ++++++++++++++-------------- |
2 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/iOS/GBAboutController.m b/iOS/GBAboutController.m @@ -70,6 +70,7 @@ } _licenseView.hidden = true; _licenseView.userInteractionEnabled = false; + _licenseView.layer.cornerRadius = 6; [root addSubview:_licenseView]; _buttonsView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)]; diff --git a/iOS/GBLoadROMTableViewController.m b/iOS/GBLoadROMTableViewController.m @@ -33,27 +33,27 @@ cell.accessoryType = [rom isEqualToString:[GBROMManager sharedManager].currentROM]? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone; NSString *pngPath = [[[GBROMManager sharedManager] autosaveStateFileForROM:rom] stringByAppendingPathExtension:@"png"]; + UIGraphicsBeginImageContextWithOptions((CGSize){60, 60}, false, self.view.window.screen.scale); + UIBezierPath *mask = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 3, 60, 54) cornerRadius:4]; + [mask addClip]; UIImage *image = [UIImage imageWithContentsOfFile:pngPath]; - if (!image) { - static dispatch_once_t onceToken; - static UIImage *emptyImage = nil; - dispatch_once(&onceToken, ^{ - UIGraphicsBeginImageContextWithOptions((CGSize){160, 144}, false, 1); - emptyImage = UIGraphicsGetImageFromCurrentImageContext(); - UIGraphicsEndImageContext(); - }); - image = emptyImage; + [image drawInRect:mask.bounds]; + if (@available(iOS 13.0, *)) { + [[UIColor tertiaryLabelColor] set]; } - cell.padding = 4; - cell.imageView.image = image; - cell.imageView.contentMode = UIViewContentModeScaleAspectFit; + else { + [UIColor colorWithWhite:0 alpha:0.5]; + } + [mask stroke]; + cell.imageView.image = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); return cell; } - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { - return 64; + return 60; } - (NSString *)title @@ -63,7 +63,7 @@ - (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section { - return @"Import ROMs using AirDrop or by opening them in SameBoy using the Files app"; + return @"Import ROMs by opening them in SameBoy using the Files app or a web browser, or by sending them over with AirDrop"; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.