From b1dee5fc233b1a9fc83fdea4dd12a82b8da6b928 Mon Sep 17 00:00:00 2001 From: rog Date: Thu, 18 Oct 2012 04:40:56 -0400 Subject: [PATCH] small fix for undo load state while not recording --- Source/Core/Core/Src/State.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/Src/State.cpp b/Source/Core/Core/Src/State.cpp index 9b5ae9edb3..88d7c7720c 100644 --- a/Source/Core/Core/Src/State.cpp +++ b/Source/Core/Core/Src/State.cpp @@ -389,7 +389,10 @@ void LoadAs(const std::string& filename) { std::lock_guard lk(g_cs_undo_load_buffer); SaveToBuffer(g_undo_load_buffer); - Movie::SaveRecording("undo.dtm"); + if (Movie::IsRecordingInput() || Movie::IsPlayingInput()) + Movie::SaveRecording("undo.dtm"); + else if (File::Exists("undo.dtm")) + File::Delete("undo.dtm"); } bool loaded = false;