summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2016-09-25 10:22:35 +0200
committerJosJuice <josjuice@gmail.com>2016-09-27 16:51:14 +0200
commitd44b2de01da3eb2ebf8a9d1b5aaab156a949475d (patch)
tree1326b90eb40bdecf98c25ecdb430fcf796e4ef51 /Source/Core
parent75dd4d0aee7092d114b16cb4313fe42538e02659 (diff)
DVDInterface: Try to enforce disc inside status on savestate load
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/HW/DVDInterface.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/Core/Core/HW/DVDInterface.cpp b/Source/Core/Core/HW/DVDInterface.cpp
index 2edac531e2..728fd8a8c7 100644
--- a/Source/Core/Core/HW/DVDInterface.cpp
+++ b/Source/Core/Core/HW/DVDInterface.cpp
@@ -296,6 +296,19 @@ void DoState(PointerWrap& p)
p.Do(s_stop_at_track_end);
DVDThread::DoState(p);
+
+ // s_inserted_volume isn't savestated (because it points to
+ // files on the local system). Instead, we check that
+ // s_disc_inside matches the status of s_inserted_volume.
+ // This won't catch cases of having the wrong disc inserted, though.
+ // TODO: Check the game ID, disc number, revision?
+ if (s_disc_inside != (s_inserted_volume != nullptr))
+ {
+ if (s_disc_inside)
+ PanicAlertT("An inserted disc was expected but not found.");
+ else
+ s_inserted_volume.reset();
+ }
}
static u32 ProcessDTKSamples(short* tempPCM, u32 num_samples)