Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
re-rearrange movie code so it actually works all of the time
  • Loading branch information
rog9 committed Oct 19, 2012
1 parent b1dee5f commit 0384f61
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Source/Core/Core/Src/Movie.h
Expand Up @@ -48,10 +48,10 @@ struct ControllerState {
bool Start:1, A:1, B:1, X:1, Y:1, Z:1; // Binary buttons, 6 bits
bool DPadUp:1, DPadDown:1, // Binary D-Pad buttons, 4 bits
DPadLeft:1, DPadRight:1;
bool L:1, R:1; // Binary triggers, 2 bits
bool L:1, R:1; // Binary triggers, 2 bits
bool reserved:4; // Reserved bits used for padding, 4 bits

u8 TriggerL, TriggerR; // Triggers, 16 bits
u8 TriggerL, TriggerR; // Triggers, 16 bits
u8 AnalogStickX, AnalogStickY; // Main Stick, 16 bits
u8 CStickX, CStickY; // Sub-Stick, 16 bits

Expand Down Expand Up @@ -103,7 +103,7 @@ struct DTMHeader {

u64 recordingStartTime; // seconds since 1970 that recording started (used for RTC)

bool bSaveConfig;
bool bSaveConfig; // Loads the settings below on startup if true
bool bSkipIdle;
bool bDualCore;
bool bProgressive;
Expand Down
9 changes: 4 additions & 5 deletions Source/Core/Core/Src/State.cpp
Expand Up @@ -201,12 +201,11 @@ void CompressAndDumpState(CompressAndDumpState_args save_args)

if (!File::Rename(filename, File::GetUserPath(D_STATESAVES_IDX) + "lastState.sav") || !File::Rename(filename + ".dtm", File::GetUserPath(D_STATESAVES_IDX) + "lastState.sav.dtm"))
Core::DisplayMessage("Failed to move previous state to state undo backup", 1000);

if ((Movie::IsRecordingInput() || Movie::IsPlayingInput()) && !Movie::IsJustStartingRecordingInputFromSaveState())
Movie::SaveRecording((filename + ".dtm").c_str());
else if (!Movie::IsRecordingInput() && !Movie::IsPlayingInput())
File::Delete(filename + ".dtm");
}
if ((Movie::IsRecordingInput() || Movie::IsPlayingInput()) && !Movie::IsJustStartingRecordingInputFromSaveState())
Movie::SaveRecording((filename + ".dtm").c_str());
else if (!Movie::IsRecordingInput() && !Movie::IsPlayingInput())
File::Delete(filename + ".dtm");

File::IOFile f(filename, "wb");
if (!f)
Expand Down

0 comments on commit 0384f61

Please sign in to comment.