Fixed a few TAS bugs. TASing should now work, provided that you DON'T change your frameskipping value...
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4030 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
1612c6a2b8
commit
f8e410e0e6
|
@ -64,13 +64,8 @@ void FrameUpdate() {
|
|||
fread(g_padStates, sizeof(ControllerState), g_numPads, g_recordfd);
|
||||
|
||||
// End of recording
|
||||
if(feof(g_recordfd)) {
|
||||
fclose(g_recordfd);
|
||||
g_recordfd = NULL;
|
||||
g_numPads = 0;
|
||||
delete[] g_padStates;
|
||||
g_playMode = MODE_NONE;
|
||||
}
|
||||
if(feof(g_recordfd))
|
||||
EndPlayInput();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -269,6 +264,8 @@ void RecordInput(SPADStatus *PadStatus, int controllerID)
|
|||
|
||||
g_padStates[controllerID].CStickX = PadStatus->substickX;
|
||||
g_padStates[controllerID].CStickY = PadStatus->substickY;
|
||||
|
||||
PlayController(PadStatus, controllerID);
|
||||
}
|
||||
|
||||
bool PlayInput(const char *filename)
|
||||
|
@ -367,4 +364,12 @@ void PlayController(SPADStatus *PadStatus, int controllerID)
|
|||
PadStatus->substickY = g_padStates[controllerID].CStickY;
|
||||
}
|
||||
|
||||
void EndPlayInput() {
|
||||
fclose(g_recordfd);
|
||||
g_recordfd = NULL;
|
||||
g_numPads = 0;
|
||||
delete[] g_padStates;
|
||||
g_playMode = MODE_NONE;
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -92,6 +92,7 @@ void EndRecordingInput();
|
|||
|
||||
bool PlayInput(const char *filename);
|
||||
void PlayController(SPADStatus *PadStatus, int controllerID);
|
||||
void EndPlayInput();
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -584,6 +584,8 @@ void CFrame::DoStop()
|
|||
// TODO: Show the author/description dialog here
|
||||
if(Frame::IsRecordingInput())
|
||||
Frame::EndRecordingInput();
|
||||
if(Frame::IsPlayingInput())
|
||||
Frame::EndPlayInput();
|
||||
|
||||
Core::Stop();
|
||||
UpdateGUI();
|
||||
|
|
Loading…
Reference in New Issue