[iPad] Fixes automatically pausing + resuming emulation with Stage Manager on iOS 16 beta 5

We use DeltaCore’s new UIWindow subclass GameWindow in SceneDelegate to fix issues that were introduced with iOS 16 beta 5.

Also removes touchControllerSkin.layoutGuide = self.view.safeAreaLayoutGuide assignment which no longer compiles due to TouchControllerSkin refactoring.
This commit is contained in:
Riley Testut 2022-08-12 19:21:54 -05:00
parent bb812c7f02
commit e1ee540d27
3 changed files with 17 additions and 3 deletions

@ -1 +1 @@
Subproject commit 90aa403e229ea1993fad455b41cc8c9ceb9da46a
Subproject commit 6a7a856a14739a9700f4121ca95d65d49744faf0

View File

@ -663,7 +663,6 @@ private extension GameViewController
else if let controllerSkin = DeltaCore.ControllerSkin.standardControllerSkin(for: game.type), controllerSkin.hasTouchScreen(for: traits)
{
var touchControllerSkin = TouchControllerSkin(controllerSkin: controllerSkin)
touchControllerSkin.layoutGuide = self.view.safeAreaLayoutGuide
if self.view.bounds.width > self.view.bounds.height
{

View File

@ -14,7 +14,20 @@ import Harmony
@objc(SceneDelegate) @available(iOS 13, *)
class SceneDelegate: UIResponder, UIWindowSceneDelegate
{
var window: UIWindow?
var window: UIWindow? {
get {
if _window == nil
{
_window = GameWindow()
}
return _window
}
set {
_window = newValue as? GameWindow
}
}
private var _window: GameWindow?
private let deepLinkController = DeepLinkController()
@ -35,6 +48,8 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate
{
self.handle(.shortcut(shortcutItem))
}
self.window?.makeKeyAndVisible()
}
func sceneDidDisconnect(_ scene: UIScene)