Fixes incorrectly previewing DS home screen instead of DSi home screen

This commit is contained in:
Riley Testut 2021-02-12 13:18:55 -06:00
parent 2c52821e72
commit 3f70300afb

View File

@ -807,6 +807,22 @@ extension GameCollectionViewController: UIViewControllerPreviewingDelegate
gameViewController.previewImage = UIImage(contentsOfFile: previewSaveState.imageFileURL.path)
}
if let emulatorBridge = gameViewController.emulatorCore?.deltaCore.emulatorBridge as? MelonDSEmulatorBridge
{
//TODO: Update this to work with multiple processes by retrieving emulatorBridge directly from emulatorCore.
if game.identifier == Game.melonDSDSiBIOSIdentifier
{
emulatorBridge.systemType = .dsi
}
else
{
emulatorBridge.systemType = .ds
}
emulatorBridge.isJITEnabled = UIDevice.current.supportsJIT
}
let actions = self.actions(for: game).previewActions
gameViewController.overridePreviewActionItems = actions