diff --git a/Delta/AppDelegate.swift b/Delta/AppDelegate.swift index affc1a8..590a266 100644 --- a/Delta/AppDelegate.swift +++ b/Delta/AppDelegate.swift @@ -27,7 +27,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate semaphore.signal() } - semaphore.wait(timeout: DispatchTime.distantFuture) + semaphore.wait() // Controllers ExternalControllerManager.shared.startMonitoringExternalControllers() diff --git a/Delta/Emulation/EmulationViewController.swift b/Delta/Emulation/EmulationViewController.swift index 9d5cbad..8fc1ca3 100644 --- a/Delta/Emulation/EmulationViewController.swift +++ b/Delta/Emulation/EmulationViewController.swift @@ -306,12 +306,12 @@ private extension EmulationViewController self.performSegue(withIdentifier: "pauseSegue", sender: sender) } - func pauseEmulation() -> Bool + @discardableResult func pauseEmulation() -> Bool { return self.emulatorCore.pause() } - func resumeEmulation() -> Bool + @discardableResult func resumeEmulation() -> Bool { guard !self.choosingSustainedButtons && self.pauseViewController == nil else { return false } @@ -443,8 +443,8 @@ private extension EmulationViewController // To ensure the emulator core recognizes us activating the input again, we need to wait at least two frames // Unfortunately we cannot init DispatchSemaphore with value less than 0 // To compensate, we simply wait twice; once the first wait returns, we wait again - semaphore.semaphore.wait(timeout: DispatchTime.distantFuture) - semaphore.semaphore.wait(timeout: DispatchTime.distantFuture) + semaphore.semaphore.wait() + semaphore.semaphore.wait() // These MUST be performed serially, or else Bad Things Happen™ if multiple inputs are reactivated at once self.reactivateSustainInputsQueue.addOperation {