diff --git a/Delta.xcodeproj/project.pbxproj b/Delta.xcodeproj/project.pbxproj index 3747437..1b7d117 100644 --- a/Delta.xcodeproj/project.pbxproj +++ b/Delta.xcodeproj/project.pbxproj @@ -141,6 +141,7 @@ BFC9B7391CEFCD34008629BB /* CheatsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFC9B7381CEFCD34008629BB /* CheatsViewController.swift */; }; BFCEA67E1D56FF640061A534 /* UIViewControllerContextTransitioning+Conveniences.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFCEA67D1D56FF640061A534 /* UIViewControllerContextTransitioning+Conveniences.swift */; }; BFD097211D3A01B8005A44C2 /* SaveStatesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF3540041C5DA70400C1184C /* SaveStatesViewController.swift */; }; + BFD1EF402336BD8800D197CF /* UIDevice+Processor.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFD1EF3F2336BD8800D197CF /* UIDevice+Processor.swift */; }; BFDB3418219E4B1700595A62 /* SyncStatusViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFDB3417219E4B1700595A62 /* SyncStatusViewController.swift */; }; BFDD04F11D5E2C27002D450E /* GameCollectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFDD04F01D5E2C27002D450E /* GameCollectionViewController.swift */; }; BFDE2CD1222DF36A008038E0 /* SwiftyDropbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BFDE2CC8222DF345008038E0 /* SwiftyDropbox.framework */; }; @@ -322,6 +323,7 @@ BFC6F7B71F435BC500221B96 /* Input+Display.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Input+Display.swift"; sourceTree = ""; }; BFC9B7381CEFCD34008629BB /* CheatsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheatsViewController.swift; sourceTree = ""; }; BFCEA67D1D56FF640061A534 /* UIViewControllerContextTransitioning+Conveniences.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIViewControllerContextTransitioning+Conveniences.swift"; sourceTree = ""; }; + BFD1EF3F2336BD8800D197CF /* UIDevice+Processor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+Processor.swift"; sourceTree = ""; }; BFDB3417219E4B1700595A62 /* SyncStatusViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SyncStatusViewController.swift; sourceTree = ""; }; BFDD04F01D5E2C27002D450E /* GameCollectionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GameCollectionViewController.swift; sourceTree = ""; }; BFDE2CC6222DF345008038E0 /* Harmony_Dropbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Harmony_Dropbox.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -398,6 +400,7 @@ BF1F45AC21AF57BA00EF9895 /* HarmonyMetadataKey+Keys.swift */, BFFBD3D8224A0756002EFC79 /* URL+ExtendedAttributes.swift */, BF647A6922FB8FCE0061D76D /* Bundle+SwizzleBundleID.swift */, + BFD1EF3F2336BD8800D197CF /* UIDevice+Processor.swift */, ); path = Extensions; sourceTree = ""; @@ -1071,6 +1074,7 @@ BF5942891E09BC8B0051894B /* _GameCollection.swift in Sources */, BF34FA111CF1899D006624C7 /* CheatTextView.swift in Sources */, BF1F45AD21AF57BA00EF9895 /* HarmonyMetadataKey+Keys.swift in Sources */, + BFD1EF402336BD8800D197CF /* UIDevice+Processor.swift in Sources */, BF71CF871FE90006001F1613 /* AppIconShortcutsViewController.swift in Sources */, BF1DAD5D1D9F576000E752A7 /* SystemControllerSkinsViewController.swift in Sources */, BFE022A01F5B57FF0052D888 /* PopoverMenuButton.swift in Sources */, diff --git a/Delta/Emulation/GameViewController.swift b/Delta/Emulation/GameViewController.swift index 8a5a850..5c44b87 100644 --- a/Delta/Emulation/GameViewController.swift +++ b/Delta/Emulation/GameViewController.swift @@ -352,11 +352,18 @@ extension GameViewController self.pausingGameController = gameController } - if self.game?.type == .ds + switch self.game?.type { + case .n64? where !UIDevice.current.hasA9ProcessorOrBetter: + // A8 processors and earlier aren't powerful enough to run N64 games faster than 1x speed. + pauseViewController.fastForwardItem = nil + + case .ds?: // Cheats and Fast Forwarding are not yet supported for DS games. pauseViewController.cheatCodesItem = nil pauseViewController.fastForwardItem = nil + + default: break } self.pauseViewController = pauseViewController diff --git a/Delta/Extensions/UIDevice+Processor.swift b/Delta/Extensions/UIDevice+Processor.swift new file mode 100644 index 0000000..9b4c8f1 --- /dev/null +++ b/Delta/Extensions/UIDevice+Processor.swift @@ -0,0 +1,19 @@ +// +// UIDevice+Processor.swift +// Delta +// +// Created by Riley Testut on 9/21/19. +// Copyright © 2019 Riley Testut. All rights reserved. +// + +import UIKit +import ARKit + +extension UIDevice +{ + var hasA9ProcessorOrBetter: Bool { + // ARKit is only supported by devices with an A9 processor or better, according to the documentation. + // https://developer.apple.com/documentation/arkit/arconfiguration/2923553-issupported + return ARConfiguration.isSupported + } +}