Updates save state usage to catch errors
This commit is contained in:
parent
d15f523dc9
commit
2e5616dd30
@ -1 +1 @@
|
|||||||
Subproject commit 64f652019405b72c2a4e3281da8d1e0514538ac3
|
Subproject commit 593e5e758bf289e7d3d40f4dc37451c2f8ef791f
|
||||||
@ -1 +1 @@
|
|||||||
Subproject commit 06b20822c7e9d28b9b3bcc6085deec2249a14e64
|
Subproject commit 4f1684a28b50e76b6f416a5bc9e0b5f95266ffa7
|
||||||
@ -1 +1 @@
|
|||||||
Subproject commit 2c913a2b2910711fa1c12be31b00f2205170c935
|
Subproject commit 29db4715fcca05791a5de4123c586a5c1590d0e0
|
||||||
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "0710"
|
LastUpgradeVersion = "0730"
|
||||||
version = "1.3">
|
version = "1.3">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "NO"
|
parallelizeBuildables = "NO"
|
||||||
|
|||||||
@ -532,7 +532,18 @@ extension EmulationViewController: SaveStatesViewControllerDelegate
|
|||||||
|
|
||||||
func saveStatesViewController(saveStatesViewController: SaveStatesViewController, loadSaveState saveState: SaveStateType)
|
func saveStatesViewController(saveStatesViewController: SaveStatesViewController, loadSaveState saveState: SaveStateType)
|
||||||
{
|
{
|
||||||
self.emulatorCore.loadSaveState(saveState)
|
do
|
||||||
|
{
|
||||||
|
try self.emulatorCore.loadSaveState(saveState)
|
||||||
|
}
|
||||||
|
catch EmulatorCore.SaveStateError.doesNotExist
|
||||||
|
{
|
||||||
|
print("Save State \(saveState.name) does not exist.")
|
||||||
|
}
|
||||||
|
catch let error as NSError
|
||||||
|
{
|
||||||
|
print(error)
|
||||||
|
}
|
||||||
|
|
||||||
self.updateCheats()
|
self.updateCheats()
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,8 @@
|
|||||||
import UIKit
|
import UIKit
|
||||||
import CoreData
|
import CoreData
|
||||||
|
|
||||||
|
import DeltaCore
|
||||||
|
|
||||||
import Roxas
|
import Roxas
|
||||||
|
|
||||||
class GamesViewController: UIViewController
|
class GamesViewController: UIViewController
|
||||||
@ -132,7 +134,20 @@ class GamesViewController: UIViewController
|
|||||||
{
|
{
|
||||||
destinationViewController.emulatorCore.startEmulation()
|
destinationViewController.emulatorCore.startEmulation()
|
||||||
destinationViewController.emulatorCore.pauseEmulation()
|
destinationViewController.emulatorCore.pauseEmulation()
|
||||||
destinationViewController.emulatorCore.loadSaveState(saveState)
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
try destinationViewController.emulatorCore.loadSaveState(saveState)
|
||||||
|
}
|
||||||
|
catch EmulatorCore.SaveStateError.doesNotExist
|
||||||
|
{
|
||||||
|
print("Save State \(saveState.name) does not exist.")
|
||||||
|
}
|
||||||
|
catch let error as NSError
|
||||||
|
{
|
||||||
|
print(error)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -427,7 +427,19 @@ private extension SaveStatesViewController
|
|||||||
// Load the save state we stored a reference to
|
// Load the save state we stored a reference to
|
||||||
emulatorCore.startEmulation()
|
emulatorCore.startEmulation()
|
||||||
emulatorCore.pauseEmulation()
|
emulatorCore.pauseEmulation()
|
||||||
emulatorCore.loadSaveState(saveState)
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
try emulatorCore.loadSaveState(saveState)
|
||||||
|
}
|
||||||
|
catch EmulatorCore.SaveStateError.doesNotExist
|
||||||
|
{
|
||||||
|
print("Save State \(saveState.name) does not exist.")
|
||||||
|
}
|
||||||
|
catch let error as NSError
|
||||||
|
{
|
||||||
|
print(error)
|
||||||
|
}
|
||||||
|
|
||||||
// Re-enable video rendering
|
// Re-enable video rendering
|
||||||
emulatorCore.videoManager.enabled = true
|
emulatorCore.videoManager.enabled = true
|
||||||
@ -542,7 +554,19 @@ extension SaveStatesViewController: UIViewControllerPreviewingDelegate
|
|||||||
|
|
||||||
emulationViewController.emulatorCore.startEmulation()
|
emulationViewController.emulatorCore.startEmulation()
|
||||||
emulationViewController.emulatorCore.pauseEmulation()
|
emulationViewController.emulatorCore.pauseEmulation()
|
||||||
emulationViewController.emulatorCore.loadSaveState(saveState)
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
try emulationViewController.emulatorCore.loadSaveState(saveState)
|
||||||
|
}
|
||||||
|
catch EmulatorCore.SaveStateError.doesNotExist
|
||||||
|
{
|
||||||
|
print("Save State \(saveState.name) does not exist.")
|
||||||
|
}
|
||||||
|
catch let error as NSError
|
||||||
|
{
|
||||||
|
print(error)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return emulationViewController
|
return emulationViewController
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user