diff --git a/Cores/DSDeltaCore b/Cores/DSDeltaCore index 88037a5..23abf63 160000 --- a/Cores/DSDeltaCore +++ b/Cores/DSDeltaCore @@ -1 +1 @@ -Subproject commit 88037a5745399074cedb665f435564bb5d89ba91 +Subproject commit 23abf633559dac471fa3b38a3cfcc12ffa68ab6e diff --git a/Cores/DeltaCore b/Cores/DeltaCore index 5570db1..3e5331f 160000 --- a/Cores/DeltaCore +++ b/Cores/DeltaCore @@ -1 +1 @@ -Subproject commit 5570db1dfe95d6e08b0abaefe63b89a9cac211fc +Subproject commit 3e5331fd79663791bbe456499517047f8d75f4f2 diff --git a/Delta/Database/Model/Human/ControllerSkin.swift b/Delta/Database/Model/Human/ControllerSkin.swift index c63d2cd..3470836 100644 --- a/Delta/Database/Model/Human/ControllerSkin.swift +++ b/Delta/Database/Model/Human/ControllerSkin.swift @@ -91,6 +91,11 @@ extension ControllerSkin: ControllerSkinProtocol return self.controllerSkin?.gameScreenFrame(for: traits) } + public func screens(for traits: DeltaCore.ControllerSkin.Traits) -> [DeltaCore.ControllerSkin.Screen]? + { + return self.controllerSkin?.screens(for: traits) + } + public func aspectRatio(for traits: DeltaCore.ControllerSkin.Traits) -> CGSize? { return self.controllerSkin?.aspectRatio(for: traits) diff --git a/Delta/Emulation/GameViewController.swift b/Delta/Emulation/GameViewController.swift index 10f0f14..2c7017e 100644 --- a/Delta/Emulation/GameViewController.swift +++ b/Delta/Emulation/GameViewController.swift @@ -267,14 +267,12 @@ extension GameViewController // Lays out self.gameView, so we can pin self.sustainButtonsContentView to it without resulting in a temporary "cannot satisfy constraints". self.view.layoutIfNeeded() - let gameViewContainerView = self.gameView.superview! - self.controllerView.translucentControllerSkinOpacity = Settings.translucentControllerSkinOpacity self.sustainButtonsContentView = UIView(frame: CGRect(x: 0, y: 0, width: self.gameView.bounds.width, height: self.gameView.bounds.height)) self.sustainButtonsContentView.translatesAutoresizingMaskIntoConstraints = false self.sustainButtonsContentView.isHidden = true - self.view.insertSubview(self.sustainButtonsContentView, aboveSubview: gameViewContainerView) + self.view.insertSubview(self.sustainButtonsContentView, aboveSubview: self.gameView) let blurEffect = UIBlurEffect(style: .dark) let vibrancyEffect = UIVibrancyEffect(blurEffect: blurEffect) @@ -300,10 +298,10 @@ extension GameViewController vibrancyView.contentView.addSubview(self.sustainButtonsBackgroundView) // Auto Layout - self.sustainButtonsContentView.leadingAnchor.constraint(equalTo: gameViewContainerView.leadingAnchor).isActive = true - self.sustainButtonsContentView.trailingAnchor.constraint(equalTo: gameViewContainerView.trailingAnchor).isActive = true - self.sustainButtonsContentView.topAnchor.constraint(equalTo: gameViewContainerView.topAnchor).isActive = true - self.sustainButtonsContentView.bottomAnchor.constraint(equalTo: gameViewContainerView.bottomAnchor).isActive = true + self.sustainButtonsContentView.leadingAnchor.constraint(equalTo: self.gameView.leadingAnchor).isActive = true + self.sustainButtonsContentView.trailingAnchor.constraint(equalTo: self.gameView.trailingAnchor).isActive = true + self.sustainButtonsContentView.topAnchor.constraint(equalTo: self.gameView.topAnchor).isActive = true + self.sustainButtonsContentView.bottomAnchor.constraint(equalTo: self.gameView.bottomAnchor).isActive = true self.updateControllerSkin() self.updateControllers() @@ -729,7 +727,7 @@ extension GameViewController: SaveStatesViewControllerDelegate self.emulatorCore?.saveSaveState(to: saveState.fileURL) } - if let snapshot = self.gameView.snapshot(), let data = snapshot.pngData() + if let snapshot = self.emulatorCore?.videoManager.snapshot(), let data = snapshot.pngData() { do {