Ignore invalid rumble data sent over Netplay to the GC Adapter

This commit is contained in:
skidau 2015-03-05 23:11:48 +11:00
parent dee6a04980
commit e5277a5f49
1 changed files with 2 additions and 1 deletions

View File

@ -376,7 +376,8 @@ void Output(int chan, u8 rumble_command)
if (SConfig::GetInstance().m_GameCubeAdapterThread)
{
libusb_interrupt_transfer(s_handle, s_endpoint_out, rumble, sizeof(rumble), &size, 16);
if (size != 0x05)
// Netplay sends invalid data which results in size = 0x00. Ignore it.
if (size != 0x05 && size != 0x00)
{
INFO_LOG(SERIALINTERFACE, "error writing rumble (size: %d)", size);
Shutdown();