Fix bug with Dolphin crash on stop when recording.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7506 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
0601385271
commit
7144162f0f
|
@ -448,7 +448,7 @@ void PlayController(SPADStatus *PadStatus, int controllerID)
|
||||||
{
|
{
|
||||||
// Correct playback is entirely dependent on the emulator polling the controllers
|
// Correct playback is entirely dependent on the emulator polling the controllers
|
||||||
// in the same order done during recording
|
// in the same order done during recording
|
||||||
if (!IsPlayingInput() || !IsUsingPad(controllerID))
|
if (!IsPlayingInput() || !IsUsingPad(controllerID) || tmpInput == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
memset(PadStatus, 0, sizeof(SPADStatus));
|
memset(PadStatus, 0, sizeof(SPADStatus));
|
||||||
|
@ -538,7 +538,7 @@ bool PlayWiimote(int wiimote, u8 *data, s8 &size)
|
||||||
{
|
{
|
||||||
s8 count = 0;
|
s8 count = 0;
|
||||||
|
|
||||||
if(!IsPlayingInput() || !IsUsingWiimote(wiimote))
|
if(!IsPlayingInput() || !IsUsingWiimote(wiimote) || tmpInput == NULL)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (inputOffset > tmpLength)
|
if (inputOffset > tmpLength)
|
||||||
|
@ -578,11 +578,11 @@ void EndPlayInput(bool cont)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
delete tmpInput;
|
|
||||||
tmpInput = NULL;
|
|
||||||
g_numPads = g_rerecords = 0;
|
g_numPads = g_rerecords = 0;
|
||||||
g_totalFrameCount = g_frameCounter = g_lagCounter = 0;
|
g_totalFrameCount = g_frameCounter = g_lagCounter = 0;
|
||||||
g_playMode = MODE_NONE;
|
g_playMode = MODE_NONE;
|
||||||
|
delete tmpInput;
|
||||||
|
tmpInput = NULL;
|
||||||
Core::DisplayMessage("Movie End", 2000);
|
Core::DisplayMessage("Movie End", 2000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue