summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2014-07-05 20:03:17 -0400
committerLioncash <mathew1800@gmail.com>2014-07-05 20:03:17 -0400
commit0ede10e38d2406ffd0eaadc34513890ec778bb56 (patch)
treee9783544771d4b061397258380abbef4b18255f9 /Source/Core
parent0b74ad1b204109b28531933028d6c18fc568f5c5 (diff)
parent86ccf13c098a52d3e554c421ad44b7b76d38bfbc (diff)
Merge pull request #562 from RachelBryk/load-input-fixes
End movie play back immediately if g_currentByte > g_totalBytes.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/Movie.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/Core/Core/Movie.cpp b/Source/Core/Core/Movie.cpp
index bc960ef832..c90b0e2512 100644
--- a/Source/Core/Core/Movie.cpp
+++ b/Source/Core/Core/Movie.cpp
@@ -822,9 +822,10 @@ void LoadInput(const std::string& filename)
u64 totalSavedBytes = t_record.GetSize() - 256;
bool afterEnd = false;
+ // This can only happen if the user manually deletes data from the dtm.
if (g_currentByte > totalSavedBytes)
{
- //PanicAlertT("Warning: You loaded a save whose movie ends before the current frame in the save (byte %u < %u) (frame %u < %u). You should load another save before continuing.", (u32)totalSavedBytes+256, (u32)g_currentByte+256, (u32)tmpHeader.frameCount, (u32)g_currentFrame);
+ PanicAlertT("Warning: You loaded a save whose movie ends before the current frame in the save (byte %u < %u) (frame %u < %u). You should load another save before continuing.", (u32)totalSavedBytes+256, (u32)g_currentByte+256, (u32)tmpHeader.frameCount, (u32)g_currentFrame);
afterEnd = true;
}
@@ -846,6 +847,7 @@ void LoadInput(const std::string& filename)
}
else if (g_currentByte > g_totalBytes)
{
+ afterEnd = true;
PanicAlertT("Warning: You loaded a save that's after the end of the current movie. (byte %u > %u) (frame %u > %u). You should load another save before continuing, or load this state with read-only mode off.", (u32)g_currentByte+256, (u32)g_totalBytes+256, (u32)g_currentFrame, (u32)g_totalFrames);
}
else if (g_currentByte > 0 && g_totalBytes > 0)