Skip to content
8 changes: 4 additions & 4 deletions Delta.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1422,11 +1422,11 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 46;
CURRENT_PROJECT_VERSION = 54;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "Delta/Supporting Files/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.3.1;
MARKETING_VERSION = 1.3.2;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" -DDEBUG";
PRODUCT_BUNDLE_IDENTIFIER = com.rileytestut.Delta;
PROVISIONING_PROFILE = "";
Expand All @@ -1451,11 +1451,11 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 46;
CURRENT_PROJECT_VERSION = 54;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "Delta/Supporting Files/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.3.1;
MARKETING_VERSION = 1.3.2;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" -DIMPACTOR";
PRODUCT_BUNDLE_IDENTIFIER = com.rileytestut.Delta;
PROVISIONING_PROFILE = "";
Expand Down
3 changes: 2 additions & 1 deletion Delta/Components/Popover Menu/ListMenuViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class ListMenuViewController: UITableViewController

override var preferredContentSize: CGSize {
get {
let navigationBarHeight = self.navigationController?.navigationBar.bounds.height ?? 0.0
// Don't include navigation bar height in calculation (as of iOS 13).
let navigationBarHeight: CGFloat = 0.0 // self.navigationController?.navigationBar.bounds.height ?? 0.0
return CGSize(width: 0, height: (self.tableView.rowHeight * CGFloat(self.items.count)) + navigationBarHeight)
}
set {}
Expand Down
18 changes: 15 additions & 3 deletions Delta/Components/Popover Menu/PopoverMenuButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,23 @@ extension UINavigationBar
private var _defaultTitleTextAttributes: [NSAttributedString.Key: Any]? {
guard self.titleTextAttributes == nil else { return self.titleTextAttributes }

guard
let contentView = self.subviews.first(where: { NSStringFromClass(type(of: $0)).contains("ContentView") || NSStringFromClass(type(of: $0)).contains("ItemView") }),
let titleLabel = contentView.subviews.first(where: { $0 is UILabel }) as? UILabel
guard let contentView = self.subviews.first(where: { NSStringFromClass(type(of: $0)).contains("ContentView") || NSStringFromClass(type(of: $0)).contains("ItemView") })
else { return nil }

let containerView: UIView

if #available(iOS 16, *)
{
guard let titleControl = contentView.subviews.first(where: { NSStringFromClass(type(of: $0)).contains("Title") }) else { return nil }
containerView = titleControl
}
else
{
containerView = contentView
}

guard let titleLabel = containerView.subviews.first(where: { $0 is UILabel }) as? UILabel else { return nil }

let textAttributes = titleLabel.attributedText?.attributes(at: 0, effectiveRange: nil)
return textAttributes
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ class ControllerInputsViewController: UIViewController
{
self.prepareCallouts()
}

// controllerView must be first responder to receive keyboard presses.
self.gameViewController.controllerView.becomeFirstResponder()
}
}

Expand Down Expand Up @@ -183,6 +186,10 @@ private extension ControllerInputsViewController
listMenuViewController.title = NSLocalizedString("Game System", comment: "")

let navigationController = UINavigationController(rootViewController: listMenuViewController)
if #available(iOS 13, *)
{
navigationController.navigationBar.scrollEdgeAppearance = navigationController.navigationBar.standardAppearance
}

let popoverMenuController = PopoverMenuController(popoverViewController: navigationController)
self.navigationItem.popoverMenuController = popoverMenuController
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ extension ControllersSettingsViewController
{
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)
{
let previousGameController = self.gameController

switch Section(rawValue: indexPath.section)!
{
case .localDevice: self.gameController = self.localDeviceController
Expand All @@ -310,7 +312,7 @@ extension ControllersSettingsViewController

let previousIndexPath: IndexPath?

if let gameController = self.gameController
if let gameController = previousGameController
{
if gameController == self.localDeviceController
{
Expand Down
3 changes: 1 addition & 2 deletions Delta/Settings/Cores/MelonDSCoreSettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@ private extension MelonDSCoreSettingsViewController
case changeCore
}

@available(iOS 13, *)
enum BIOSError: LocalizedError
{
case unknownSize(URL)
case incorrectHash(URL, hash: String, expectedHash: String)
case unsupportedHash(URL, hash: String)

@available(iOS 13, *)
case incorrectSize(URL, size: Int, validSizes: Set<ClosedRange<Measurement<UnitInformationStorage>>>)

private static let byteFormatter: ByteCountFormatter = {
Expand Down