diff --git a/src/ios/EmulationGame.swift b/src/ios/EmulationGame.swift index da06753279..8d8bb9ea9a 100644 --- a/src/ios/EmulationGame.swift +++ b/src/ios/EmulationGame.swift @@ -21,11 +21,11 @@ struct EmulationGame : Comparable, Hashable, Identifiable { hasher.combine(title) } - static func < (lhs: EmulationGame, rhs: Yuzu) -> Bool { + static func < (lhs: EmulationGame, rhs: EmulationGame) -> Bool { lhs.title < rhs.title } - static func == (lhs: EmulationGame, rhs: Yuzu) -> Bool { + static func == (lhs: EmulationGame, rhs: EmulationGame) -> Bool { lhs.title == rhs.title } } diff --git a/src/ios/EmulationView.swift b/src/ios/EmulationView.swift index 03de53265a..55131d1d02 100644 --- a/src/ios/EmulationView.swift +++ b/src/ios/EmulationView.swift @@ -153,7 +153,6 @@ struct ControllerView: View { motion.valueChangedHandler = { motion in // Get current time let currentTimestamp = Date().timeIntervalSince1970 - let deltaTimestamp = Int32((currentTimestamp - lastTimestamp) * 1000) // Difference in milliseconds // Update last timestamp lastTimestamp = currentTimestamp diff --git a/src/ios/GameListView.swift b/src/ios/GameListView.swift index cdbd6adcfe..47fec2fa2e 100644 --- a/src/ios/GameListView.swift +++ b/src/ios/GameListView.swift @@ -52,7 +52,7 @@ struct GameListView: View { var body: some View { let filteredGames = core.games.filter { game in - guard let EmulationGame = game as? PoYuzume else { return false } + guard let EmulationGame = game as? EmulationGame else { return false } return searchText.isEmpty || EmulationGame.title.localizedCaseInsensitiveContains(searchText) } ScrollView { diff --git a/src/ios/JoystickView.swift b/src/ios/JoystickView.swift index 6f724e92f7..67907e87be 100644 --- a/src/ios/JoystickView.swift +++ b/src/ios/JoystickView.swift @@ -18,13 +18,13 @@ public struct Joystick: View { let appui = AppUI.shared - @ObservedObject public var joystickMonitor = SwiftUIJoystick.JoystickMonitor() + @ObservedObject public var joystickMonitor = JoystickMonitor() private let dragDiameter: CGFloat = 160 - private let shape: SwiftUIJoystick.JoystickShape = .circle + private let shape: JoystickShape = .circle public var body: some View { VStack{ - SwiftUIJoystick.JoystickBuilder( + JoystickBuilder( monitor: self.joystickMonitor, width: self.dragDiameter, shape: .circle, diff --git a/src/ios/KeyboardHostingController.swift b/src/ios/KeyboardHostingController.swift index 4646b17062..f8f972f61e 100644 --- a/src/ios/KeyboardHostingController.swift +++ b/src/ios/KeyboardHostingController.swift @@ -18,10 +18,10 @@ class KeyboardHostingController: UIHostingController { override var keyCommands: [UIKeyCommand]? { return [ - UIKeyCommand(input: UIKeyCommand.inputUpArrow, modifierFlags: [], action: #selector(handleKeyCommand)), - UIKeyCommand(input: UIKeyCommand.inputDownArrow, modifierFlags: [], action: #selector(handleKeyCommand)), - UIKeyCommand(input: UIKeyCommand.inputLeftArrow, modifierFlags: [], action: #selector(handleKeyCommand)), - UIKeyCommand(input: UIKeyCommand.inputRightArrow, modifierFlags: [], action: #selector(handleKeyCommand)), + UIKeyCommand(input: UIKeyInputUpArrow, modifierFlags: [], action: #selector(handleKeyCommand)), + UIKeyCommand(input: UIKeyInputDownArrow, modifierFlags: [], action: #selector(handleKeyCommand)), + UIKeyCommand(input: UIKeyInputLeftArrow, modifierFlags: [], action: #selector(handleKeyCommand)), + UIKeyCommand(input: UIKeyInputRightArrow, modifierFlags: [], action: #selector(handleKeyCommand)), UIKeyCommand(input: "w", modifierFlags: [], action: #selector(handleKeyCommand)), UIKeyCommand(input: "s", modifierFlags: [], action: #selector(handleKeyCommand)), UIKeyCommand(input: "a", modifierFlags: [], action: #selector(handleKeyCommand)), @@ -32,13 +32,13 @@ class KeyboardHostingController: UIHostingController { @objc func handleKeyCommand(_ sender: UIKeyCommand) { if let input = sender.input { switch input { - case UIKeyCommand.inputUpArrow: + case UIKeyInputUpArrow: print("Up Arrow Pressed") - case UIKeyCommand.inputDownArrow: + case UIKeyInputDownArrow: print("Down Arrow Pressed") - case UIKeyCommand.inputLeftArrow: + case UIKeyInputLeftArrow: print("Left Arrow Pressed") - case UIKeyCommand.inputRightArrow: + case UIKeyInputRightArrow: print("Right Arrow Pressed") case "w": print("W Key Pressed") diff --git a/src/ios/LibraryView.swift b/src/ios/LibraryView.swift index cec8744b32..a12e88dd1f 100644 --- a/src/ios/LibraryView.swift +++ b/src/ios/LibraryView.swift @@ -32,7 +32,7 @@ struct LibraryView: View { if doesitexist.0, doesitexist.1 { HomeView(core: core) } else { - let (doesKeyExist, doesProdExist) = doeskeysexist() + let (doesKeyExist, doesProdExist) = doesKeysExist() ScrollView { Text("You Are Missing These Files:") .font(.headline) @@ -73,7 +73,7 @@ struct LibraryView: View { } } .refreshable { - doesitexist = doeskeysexist() + doesitexist = doesKeysExist() } @@ -116,7 +116,7 @@ struct LibraryView: View { } }) .onAppear() { - doesitexist = doeskeysexist() + doesitexist = doesKeysExist() } .navigationBarTitle("Library", displayMode: .inline) .toolbar { @@ -155,36 +155,30 @@ struct LibraryView: View { } } - - func doeskeysexist() -> (Bool, Bool) { + func doesKeysExist() -> (Bool, Bool) { var doesprodexist = false var doestitleexist = false - - let title = core.root.appendingPathComponent("keys").appendingPathComponent("title.keys") let prod = core.root.appendingPathComponent("keys").appendingPathComponent("prod.keys") let fileManager = FileManager.default - let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] - if fileManager.fileExists(atPath: prod.path) { doesprodexist = true } else { print("File does not exist") } - if fileManager.fileExists(atPath: title.path) { doestitleexist = true } else { print("File does not exist") } - return (doestitleexist, doesprodexist) } } func getDeveloperNames() -> String { - guard let s = infoDictionary?["CFBundleIdentifier"] as? String else { - return "Unknown" - } - return s + // guard let s = infoDictionary?["CFBundleIdentifier"] as? String else { + // return "Unknown" + // } + // return s + return "what" }