Compare commits

...

7 Commits

Author SHA1 Message Date
Riley Testut
5be9f81527 Updates app version to 1.3.2 2022-09-20 14:38:01 -05:00
Riley Testut
91544458fd Fixes previous game controller remaining selected when changing controller 2022-09-20 14:35:47 -05:00
Riley Testut
8be02b88e5 Fixes displaying system name in dark text when remapping inputs on iOS 16 2022-09-20 14:21:21 -05:00
Riley Testut
d85d630f47 Fixes not detecting keyboard presses when remapping inputs 2022-09-20 14:20:45 -05:00
Riley Testut
0bd836c7aa Fixes ControllerInputsViewController’s system picker UI 2022-09-20 14:20:18 -05:00
Riley Testut
576317fe3e Fixes keyboard support on iOS 15+ 2022-09-20 14:19:35 -05:00
Riley Testut
41f8c78f7c Fixes BIOSError compilation error when compiling with Xcode 13
Xcode 12 and older incorrectly let us declare BIOSError.incorrectSize as @available(iOS 13), but Swift doesn't support @available for enum cases with associated values. Xcode 13 now properly enforces this restriction, so we instead mark the enum itself as @available(iOS 13).
2022-09-20 14:15:46 -05:00
7 changed files with 33 additions and 12 deletions

@ -1 +1 @@
Subproject commit e2b3f0e46b4c64670e13fd0466ebdac719f84555 Subproject commit 2a6779e1271bc5d2e09aea2aa41fa6a0b75b62aa

View File

@ -1422,11 +1422,11 @@
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 46; CURRENT_PROJECT_VERSION = 52;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "Delta/Supporting Files/Info.plist"; INFOPLIST_FILE = "Delta/Supporting Files/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 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"; OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" -DDEBUG";
PRODUCT_BUNDLE_IDENTIFIER = com.rileytestut.Delta; PRODUCT_BUNDLE_IDENTIFIER = com.rileytestut.Delta;
PROVISIONING_PROFILE = ""; PROVISIONING_PROFILE = "";
@ -1451,11 +1451,11 @@
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 46; CURRENT_PROJECT_VERSION = 52;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "Delta/Supporting Files/Info.plist"; INFOPLIST_FILE = "Delta/Supporting Files/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 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"; OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" -DIMPACTOR";
PRODUCT_BUNDLE_IDENTIFIER = com.rileytestut.Delta; PRODUCT_BUNDLE_IDENTIFIER = com.rileytestut.Delta;
PROVISIONING_PROFILE = ""; PROVISIONING_PROFILE = "";

View File

@ -21,7 +21,8 @@ class ListMenuViewController: UITableViewController
override var preferredContentSize: CGSize { override var preferredContentSize: CGSize {
get { get {
let navigationBarHeight = self.navigationController?.navigationBar.bounds.height ?? 0.0 // Don't include navigation bar height in calculation (as of iOS 13).
let navigationBarHeight = 0.0 // self.navigationController?.navigationBar.bounds.height ?? 0.0
return CGSize(width: 0, height: (self.tableView.rowHeight * CGFloat(self.items.count)) + navigationBarHeight) return CGSize(width: 0, height: (self.tableView.rowHeight * CGFloat(self.items.count)) + navigationBarHeight)
} }
set {} set {}

View File

@ -38,11 +38,23 @@ extension UINavigationBar
private var _defaultTitleTextAttributes: [NSAttributedString.Key: Any]? { private var _defaultTitleTextAttributes: [NSAttributedString.Key: Any]? {
guard self.titleTextAttributes == nil else { return self.titleTextAttributes } guard self.titleTextAttributes == nil else { return self.titleTextAttributes }
guard guard let contentView = self.subviews.first(where: { NSStringFromClass(type(of: $0)).contains("ContentView") || NSStringFromClass(type(of: $0)).contains("ItemView") })
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
else { return nil } 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) let textAttributes = titleLabel.attributedText?.attributes(at: 0, effectiveRange: nil)
return textAttributes return textAttributes
} }

View File

@ -91,6 +91,9 @@ class ControllerInputsViewController: UIViewController
{ {
self.prepareCallouts() self.prepareCallouts()
} }
// controllerView must be first responder to receive keyboard presses.
self.gameViewController.controllerView.becomeFirstResponder()
} }
} }
@ -183,6 +186,10 @@ private extension ControllerInputsViewController
listMenuViewController.title = NSLocalizedString("Game System", comment: "") listMenuViewController.title = NSLocalizedString("Game System", comment: "")
let navigationController = UINavigationController(rootViewController: listMenuViewController) let navigationController = UINavigationController(rootViewController: listMenuViewController)
if #available(iOS 13, *)
{
navigationController.navigationBar.scrollEdgeAppearance = navigationController.navigationBar.standardAppearance
}
let popoverMenuController = PopoverMenuController(popoverViewController: navigationController) let popoverMenuController = PopoverMenuController(popoverViewController: navigationController)
self.navigationItem.popoverMenuController = popoverMenuController self.navigationItem.popoverMenuController = popoverMenuController

View File

@ -296,6 +296,8 @@ extension ControllersSettingsViewController
{ {
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)
{ {
let previousGameController = self.gameController
switch Section(rawValue: indexPath.section)! switch Section(rawValue: indexPath.section)!
{ {
case .localDevice: self.gameController = self.localDeviceController case .localDevice: self.gameController = self.localDeviceController
@ -310,7 +312,7 @@ extension ControllersSettingsViewController
let previousIndexPath: IndexPath? let previousIndexPath: IndexPath?
if let gameController = self.gameController if let gameController = previousGameController
{ {
if gameController == self.localDeviceController if gameController == self.localDeviceController
{ {

View File

@ -28,13 +28,12 @@ private extension MelonDSCoreSettingsViewController
case changeCore case changeCore
} }
@available(iOS 13, *)
enum BIOSError: LocalizedError enum BIOSError: LocalizedError
{ {
case unknownSize(URL) case unknownSize(URL)
case incorrectHash(URL, hash: String, expectedHash: String) case incorrectHash(URL, hash: String, expectedHash: String)
case unsupportedHash(URL, hash: String) case unsupportedHash(URL, hash: String)
@available(iOS 13, *)
case incorrectSize(URL, size: Int, validSizes: Set<ClosedRange<Measurement<UnitInformationStorage>>>) case incorrectSize(URL, size: Int, validSizes: Set<ClosedRange<Measurement<UnitInformationStorage>>>)
private static let byteFormatter: ByteCountFormatter = { private static let byteFormatter: ByteCountFormatter = {