mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-01 10:13:38 +00:00
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
This commit is contained in:
parent
b9b4a0c530
commit
4529930f91
@ -40,12 +40,14 @@ int CSIDevice_GCAdapter::RunBuffer(u8* _pBuffer, int _iLength)
|
|||||||
// Read the command
|
// Read the command
|
||||||
EBufferCommands command = static_cast<EBufferCommands>(_pBuffer[3]);
|
EBufferCommands command = static_cast<EBufferCommands>(_pBuffer[3]);
|
||||||
|
|
||||||
// get the correct pad number that should rumble locally when using netplay
|
|
||||||
const u8 numPAD = NetPlay_InGamePadToLocalPad(ISIDevice::m_iDeviceNumber);
|
const u8 numPAD = NetPlay_InGamePadToLocalPad(ISIDevice::m_iDeviceNumber);
|
||||||
if (!GCAdapter::DeviceConnected(numPAD))
|
if (numPAD < 4)
|
||||||
{
|
{
|
||||||
reinterpret_cast<u32*>(_pBuffer)[0] = SI_NONE;
|
if (!GCAdapter::DeviceConnected(numPAD))
|
||||||
return 4;
|
{
|
||||||
|
reinterpret_cast<u32*>(_pBuffer)[0] = SI_NONE;
|
||||||
|
return 4;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle it
|
// Handle it
|
||||||
|
Loading…
x
Reference in New Issue
Block a user