summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorScott Mansell <phiren@gmail.com>2016-04-25 15:26:31 +1200
committerScott Mansell <phiren@gmail.com>2016-04-25 15:26:31 +1200
commit429ae8fb01162ee861caaf46ca2e5c7ea2b80706 (patch)
tree4df9355eb86a33b55fb587bb02a64a26264c4e7c /Source/Core
parent3033096223de1a212d475cd670705c00daeba88d (diff)
Fix netplay desync when using wii-u adapter.
If the game sent a command to a disconnected controller, the wii u adapter code would return a diffrent response. This simply deletes the speclized version of RunBuffer for the wii-u adapter as the only diffrence was the code which detected disconnected controllers and returned a error.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/HW/SI_DeviceGCAdapter.cpp80
-rw-r--r--Source/Core/Core/HW/SI_DeviceGCAdapter.h1
2 files changed, 0 insertions, 81 deletions
diff --git a/Source/Core/Core/HW/SI_DeviceGCAdapter.cpp b/Source/Core/Core/HW/SI_DeviceGCAdapter.cpp
index 974a8d79b4..718091dca7 100644
--- a/Source/Core/Core/HW/SI_DeviceGCAdapter.cpp
+++ b/Source/Core/Core/HW/SI_DeviceGCAdapter.cpp
@@ -32,86 +32,6 @@ GCPadStatus CSIDevice_GCAdapter::GetPadStatus()
return PadStatus;
}
-int CSIDevice_GCAdapter::RunBuffer(u8* _pBuffer, int _iLength)
-{
- // For debug logging only
- ISIDevice::RunBuffer(_pBuffer, _iLength);
-
- // Read the command
- EBufferCommands command = static_cast<EBufferCommands>(_pBuffer[3]);
-
- const u8 numPAD = NetPlay_InGamePadToLocalPad(ISIDevice::m_iDeviceNumber);
- if (numPAD < 4)
- {
- if (!GCAdapter::DeviceConnected(numPAD))
- {
- reinterpret_cast<u32*>(_pBuffer)[0] = SI_NONE;
- return 4;
- }
- }
-
- // Handle it
- switch (command)
- {
- case CMD_RESET:
- case CMD_ID:
- *(u32*)&_pBuffer[0] = SI_GC_CONTROLLER;
- break;
-
- case CMD_DIRECT:
- {
- INFO_LOG(SERIALINTERFACE, "PAD - Direct (Length: %d)", _iLength);
- u32 high, low;
- GetData(high, low);
- for (int i = 0; i < (_iLength - 1) / 2; i++)
- {
- _pBuffer[i + 0] = (high >> (i * 8)) & 0xff;
- _pBuffer[i + 4] = (low >> (i * 8)) & 0xff;
- }
- }
- break;
-
- case CMD_ORIGIN:
- {
- INFO_LOG(SERIALINTERFACE, "PAD - Get Origin");
-
- Calibrate();
-
- u8* pCalibration = reinterpret_cast<u8*>(&m_Origin);
- for (int i = 0; i < (int)sizeof(SOrigin); i++)
- {
- _pBuffer[i ^ 3] = *pCalibration++;
- }
- }
- break;
-
- // Recalibrate (FiRES: i am not 100 percent sure about this)
- case CMD_RECALIBRATE:
- {
- INFO_LOG(SERIALINTERFACE, "PAD - Recalibrate");
-
- Calibrate();
-
- u8* pCalibration = reinterpret_cast<u8*>(&m_Origin);
- for (int i = 0; i < (int)sizeof(SOrigin); i++)
- {
- _pBuffer[i ^ 3] = *pCalibration++;
- }
- }
- break;
-
- // DEFAULT
- default:
- {
- ERROR_LOG(SERIALINTERFACE, "Unknown SI command (0x%x)", command);
- PanicAlert("SI: Unknown command (0x%x)", command);
- }
- break;
- }
-
- return _iLength;
-}
-
void CSIDevice_GCAdapter::SendCommand(u32 _Cmd, u8 _Poll)
{
UCommand command(_Cmd);
diff --git a/Source/Core/Core/HW/SI_DeviceGCAdapter.h b/Source/Core/Core/HW/SI_DeviceGCAdapter.h
index 67e1adc348..17d59e8126 100644
--- a/Source/Core/Core/HW/SI_DeviceGCAdapter.h
+++ b/Source/Core/Core/HW/SI_DeviceGCAdapter.h
@@ -14,6 +14,5 @@ public:
CSIDevice_GCAdapter(SIDevices device, int _iDeviceNumber);
GCPadStatus GetPadStatus() override;
- int RunBuffer(u8* _pBuffer, int _iLength) override;
void SendCommand(u32 _Cmd, u8 _Poll) override;
};