From 4529930f914c1a2ba52f7d0c0df73097a92f5bfa Mon Sep 17 00:00:00 2001 From: mathieui Date: Thu, 28 Jan 2016 02:46:58 +0100 Subject: [PATCH] gcadapter: fix an incorrect mapping for non-local devices Remote devices would always enter an error path and get disconnected from the gamecube, breaking netplay in the process. Culprit is still InGamePadToLocalPad --- Source/Core/Core/HW/SI_DeviceGCAdapter.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/Core/Core/HW/SI_DeviceGCAdapter.cpp b/Source/Core/Core/HW/SI_DeviceGCAdapter.cpp index 9d96fadc3e..974a8d79b4 100644 --- a/Source/Core/Core/HW/SI_DeviceGCAdapter.cpp +++ b/Source/Core/Core/HW/SI_DeviceGCAdapter.cpp @@ -40,12 +40,14 @@ int CSIDevice_GCAdapter::RunBuffer(u8* _pBuffer, int _iLength) // Read the command EBufferCommands command = static_cast(_pBuffer[3]); - // get the correct pad number that should rumble locally when using netplay const u8 numPAD = NetPlay_InGamePadToLocalPad(ISIDevice::m_iDeviceNumber); - if (!GCAdapter::DeviceConnected(numPAD)) + if (numPAD < 4) { - reinterpret_cast(_pBuffer)[0] = SI_NONE; - return 4; + if (!GCAdapter::DeviceConnected(numPAD)) + { + reinterpret_cast(_pBuffer)[0] = SI_NONE; + return 4; + } } // Handle it