Skip to content

Commit

Permalink
Merge pull request #2048 from RachelBryk/less-of-a-clusterfuck
Browse files Browse the repository at this point in the history
Remove an unneeded global variable from Movie.cpp.
  • Loading branch information
delroth committed Feb 14, 2015
2 parents 4ceae57 + b66df84 commit 4d3c1c7
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Source/Core/Core/Movie.cpp
Expand Up @@ -79,8 +79,6 @@ static u32 s_DSPcoefHash = 0;
static bool s_bRecordingFromSaveState = false;
static bool s_bPolled = false;

static std::string tmpStateFilename = File::GetUserPath(D_STATESAVES_IDX) + "dtm.sav";

static std::string s_InputDisplay[8];

static GCManipFunction gcmfunc = nullptr;
Expand Down Expand Up @@ -469,10 +467,10 @@ bool BeginRecordingInput(int controllers)

if (Core::IsRunningAndStarted())
{
if (File::Exists(tmpStateFilename))
File::Delete(tmpStateFilename);
if (File::Exists(File::GetUserPath(D_STATESAVES_IDX) + "dtm.sav"))
File::Delete(File::GetUserPath(D_STATESAVES_IDX) + "dtm.sav");

State::SaveAs(tmpStateFilename);
State::SaveAs(File::GetUserPath(D_STATESAVES_IDX) + "dtm.sav");
s_bRecordingFromSaveState = true;

// This is only done here if starting from save state because otherwise we won't have the titleid. Otherwise it's set in WII_IPC_HLE_Device_es.cpp.
Expand Down Expand Up @@ -1242,7 +1240,7 @@ void SaveRecording(const std::string& filename)
if (success && s_bRecordingFromSaveState)
{
std::string stateFilename = filename + ".sav";
success = File::Copy(tmpStateFilename, stateFilename);
success = File::Copy(File::GetUserPath(D_STATESAVES_IDX) + "dtm.sav", stateFilename);
}

if (success)
Expand Down

0 comments on commit 4d3c1c7

Please sign in to comment.