I think this should fix the "Wiimote sudden death after 15 min" issue, actually I announced this was a test in the log message of r4647, but it seems no one has noticed.
Added the missing file in last rev. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4664 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
c9f98d8f2b
commit
0fa1f968c7
|
@ -468,25 +468,6 @@ u32 CWII_IPC_HLE_Device_usb_oh1_57e_305::Update()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// This seems not necessary at all or at least not helping to avoid de-sync at all???
|
|
||||||
/*
|
|
||||||
// AyuanX: This event should be sent periodically after ACL connection is accepted
|
|
||||||
// or CPU will disconnect WiiMote automatically
|
|
||||||
// but don't send too many or it will jam the bus and cost extra CPU time
|
|
||||||
//
|
|
||||||
if (m_HCIBuffer.m_address && !WII_IPCInterface::GetAddress() && m_WiiMotes[0].IsConnected())
|
|
||||||
{
|
|
||||||
m_FreqDividerSync++;
|
|
||||||
if ((m_PacketCount > 0) || (m_FreqDividerSync > 100)) // Feel free to tweak it
|
|
||||||
{
|
|
||||||
m_FreqDividerSync = 0;
|
|
||||||
SendEventNumberOfCompletedPackets(m_WiiMotes[0].GetConnectionHandle(), m_PacketCount);
|
|
||||||
m_PacketCount = 0;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
// The Real Wiimote sends report at a fixed frequency of 100Hz
|
// The Real Wiimote sends report at a fixed frequency of 100Hz
|
||||||
// So let's make it also 100Hz here
|
// So let's make it also 100Hz here
|
||||||
// Calculation: 15000Hz (IPC_HLE) / 100Hz (WiiMote) = 150
|
// Calculation: 15000Hz (IPC_HLE) / 100Hz (WiiMote) = 150
|
||||||
|
@ -501,6 +482,22 @@ u32 CWII_IPC_HLE_Device_usb_oh1_57e_305::Update()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This event should be sent periodically after ACL connection is accepted
|
||||||
|
// or CPU will disconnect WiiMote automatically
|
||||||
|
// but don't send too many or it will jam the bus and cost extra CPU time
|
||||||
|
// TODO: Figure out the correct frequency to send this thing
|
||||||
|
if (m_HCIBuffer.m_address && !WII_IPCInterface::GetAddress() && m_WiiMotes[0].IsConnected())
|
||||||
|
{
|
||||||
|
m_FreqDividerSync++;
|
||||||
|
if ((m_PacketCount > 0) || (m_FreqDividerSync >= 100)) // Feel free to tweak it
|
||||||
|
{
|
||||||
|
m_FreqDividerSync = 0;
|
||||||
|
SendEventNumberOfCompletedPackets(m_WiiMotes[0].GetConnectionHandle(), m_PacketCount);
|
||||||
|
m_PacketCount = 0;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -169,14 +169,18 @@ enum
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct PadAxis
|
union PadAxis
|
||||||
{
|
{
|
||||||
int Lx;
|
int keyForControls[6];
|
||||||
int Ly;
|
struct
|
||||||
int Rx;
|
{
|
||||||
int Ry;
|
int Lx;
|
||||||
int Tl; // Triggers
|
int Ly;
|
||||||
int Tr;
|
int Rx;
|
||||||
|
int Ry;
|
||||||
|
int Tl; // Trigger
|
||||||
|
int Tr; // Trigger
|
||||||
|
};
|
||||||
};
|
};
|
||||||
struct PadWiimote
|
struct PadWiimote
|
||||||
{
|
{
|
||||||
|
@ -184,7 +188,6 @@ struct PadWiimote
|
||||||
// Order is A, B, 1, 2, +, -, Home
|
// Order is A, B, 1, 2, +, -, Home
|
||||||
// L, R, U, D, RollL, RollR, PitchU, PitchD, Shake
|
// L, R, U, D, RollL, RollR, PitchU, PitchD, Shake
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PadNunchuck
|
struct PadNunchuck
|
||||||
{
|
{
|
||||||
int keyForControls[7];
|
int keyForControls[7];
|
||||||
|
@ -201,7 +204,8 @@ struct PadGH3Controller
|
||||||
{
|
{
|
||||||
int keyForControls[14];
|
int keyForControls[14];
|
||||||
// Order is Green, Red, Yellow, Blue, Orange,
|
// Order is Green, Red, Yellow, Blue, Orange,
|
||||||
// +, -, Whammy, Al, Au, Ar, Ad,
|
// +, -, Whammy,
|
||||||
|
// Al, Ar, Au, Ad,
|
||||||
// StrumUp, StrumDown
|
// StrumUp, StrumDown
|
||||||
};
|
};
|
||||||
struct CONTROLLER_STATE_NEW // GC PAD INFO/STATE
|
struct CONTROLLER_STATE_NEW // GC PAD INFO/STATE
|
||||||
|
|
Loading…
Reference in New Issue