fix for wiimote dying if you use savesetates too fast

(by dying I mean all wiimote slots permanently disconnecting until emulation reset)
This commit is contained in:
nitsuja 2011-12-18 19:30:04 -08:00
parent 15dac4584f
commit 4a88d5ae93
2 changed files with 2 additions and 1 deletions

View file

@ -129,7 +129,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::DoState(PointerWrap &p)
// Reset the connection of all connected wiimotes
for (unsigned int i = 0; i < 4; i++)
{
if (m_WiiMotes[i].IsConnected())
if (!m_WiiMotes[i].IsInactive())
{
m_WiiMotes[i].Activate(false);
m_WiiMotes[i].Activate(true);

View file

@ -59,6 +59,7 @@ public:
// we really have to clean all this code
bool IsConnected() const { return m_ConnectionState == CONN_COMPLETE; }
bool IsInactive() const { return m_ConnectionState == CONN_INACTIVE; }
bool LinkChannel();
void ResetChannels();
void Activate(bool ready);