Fixes crash when previewing DS games without BIOS files

This commit is contained in:
Riley Testut 2021-01-19 14:41:55 -06:00
parent f81f6cbf3d
commit c97611482e

View File

@ -937,6 +937,16 @@ extension GameCollectionViewController
return UIContextMenuConfiguration(identifier: indexPath as NSIndexPath, previewProvider: { [weak self] in
guard let self = self else { return nil }
do
{
try self.validateLaunchingGame(game, ignoringErrors: [LaunchError.alreadyRunning])
}
catch
{
print("Error trying to preview game:", error)
return nil
}
let previewViewController = self.makePreviewGameViewController(for: game)
previewViewController.isLivePreview = Settings.isPreviewsEnabled