Tweaks to Wii rerecording for general stability and reliability.

* Better control over which Wiimotes save/load input from input files (general sync improvement).
* Wiimote save stores the ACLQ, allowing maintaining control across save/load (thanks to skid for the idea).
* Wiimote reconnect on save/load now an option - enabled by default to preserve present behaviour.  Disabling this allows the above change to be effective.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7147 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
smelenchuk
2011-02-12 08:25:09 +00:00
parent 8895d6a250
commit 94d02a23de
9 changed files with 60 additions and 26 deletions

View File

@@ -239,9 +239,9 @@ void RecordInput(SPADStatus *PadStatus, int controllerID)
fwrite(&g_padState, sizeof(ControllerState), 1, g_recordfd);
}
void RecordWiimote(u8 *data, s8 size)
void RecordWiimote(int wiimote, u8 *data, s8 size)
{
if(!IsRecordingInput())
if(!IsRecordingInput() || !IsUsingWiimote(wiimote))
return;
fwrite(&size, 1, 1, g_recordfd);
@@ -409,11 +409,11 @@ void PlayController(SPADStatus *PadStatus, int controllerID)
}
}
void PlayWiimote(u8 *data, s8 &size)
bool PlayWiimote(int wiimote, u8 *data, s8 &size)
{
s8 count = 0;
if(!IsPlayingInput())
return;
if(!IsPlayingInput() || !IsUsingWiimote(wiimote))
return false;
fread(&count, 1, 1, g_recordfd);
size = (count > size) ? size : count;
@@ -425,6 +425,7 @@ void PlayWiimote(u8 *data, s8 &size)
Core::DisplayMessage("Movie End", 2000);
EndPlayInput();
}
return true;
}
void EndPlayInput() {