Fixes checking UIView.window on background thread

This commit is contained in:
Riley Testut 2019-06-21 14:11:21 -07:00
parent bf435b88b3
commit 283453b387

View File

@ -928,7 +928,12 @@ extension GameViewController: GameViewControllerDelegate
func gameViewControllerShouldResumeEmulation(_ gameViewController: DeltaCore.GameViewController) -> Bool
{
let result = (self.presentedViewController == nil || self.presentedViewController?.isDisappearing == true) && !self.isSelectingSustainedButtons && self.view.window != nil
var result = false
rst_dispatch_sync_on_main_thread {
result = (self.presentedViewController == nil || self.presentedViewController?.isDisappearing == true) && !self.isSelectingSustainedButtons && self.view.window != nil
}
return result
}
}