mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 15:19:42 -06:00
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:
@ -64,13 +64,8 @@ void FrameUpdate() {
|
|||||||
fread(g_padStates, sizeof(ControllerState), g_numPads, g_recordfd);
|
fread(g_padStates, sizeof(ControllerState), g_numPads, g_recordfd);
|
||||||
|
|
||||||
// End of recording
|
// End of recording
|
||||||
if(feof(g_recordfd)) {
|
if(feof(g_recordfd))
|
||||||
fclose(g_recordfd);
|
EndPlayInput();
|
||||||
g_recordfd = NULL;
|
|
||||||
g_numPads = 0;
|
|
||||||
delete[] g_padStates;
|
|
||||||
g_playMode = MODE_NONE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -269,6 +264,8 @@ void RecordInput(SPADStatus *PadStatus, int controllerID)
|
|||||||
|
|
||||||
g_padStates[controllerID].CStickX = PadStatus->substickX;
|
g_padStates[controllerID].CStickX = PadStatus->substickX;
|
||||||
g_padStates[controllerID].CStickY = PadStatus->substickY;
|
g_padStates[controllerID].CStickY = PadStatus->substickY;
|
||||||
|
|
||||||
|
PlayController(PadStatus, controllerID);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PlayInput(const char *filename)
|
bool PlayInput(const char *filename)
|
||||||
@ -367,4 +364,12 @@ void PlayController(SPADStatus *PadStatus, int controllerID)
|
|||||||
PadStatus->substickY = g_padStates[controllerID].CStickY;
|
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);
|
bool PlayInput(const char *filename);
|
||||||
void PlayController(SPADStatus *PadStatus, int controllerID);
|
void PlayController(SPADStatus *PadStatus, int controllerID);
|
||||||
|
void EndPlayInput();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -584,6 +584,8 @@ void CFrame::DoStop()
|
|||||||
// TODO: Show the author/description dialog here
|
// TODO: Show the author/description dialog here
|
||||||
if(Frame::IsRecordingInput())
|
if(Frame::IsRecordingInput())
|
||||||
Frame::EndRecordingInput();
|
Frame::EndRecordingInput();
|
||||||
|
if(Frame::IsPlayingInput())
|
||||||
|
Frame::EndPlayInput();
|
||||||
|
|
||||||
Core::Stop();
|
Core::Stop();
|
||||||
UpdateGUI();
|
UpdateGUI();
|
||||||
|
Reference in New Issue
Block a user