GCAdapter: Return input state by value
This commit is contained in:
1 parent
2be2b2a4f1
commit
041f4f5eea
6 files changed
+60
-55
No files matched your search
@@ -25,19 +25,18 @@ CSIDevice_GCAdapter::CSIDevice_GCAdapter(SIDevices device, int _iDeviceNumber)
|
||||
|
||||
GCPadStatus CSIDevice_GCAdapter::GetPadStatus()
|
||||
{
|
||||
GCPadStatus PadStatus;
|
||||
memset(&PadStatus, 0, sizeof(PadStatus));
|
||||
GCPadStatus pad_status = {};
|
||||
|
||||
// For netplay, the local controllers are polled in GetNetPads(), and
|
||||
// the remote controllers receive their status there as well
|
||||
if (!NetPlay::IsNetPlayRunning())
|
||||
{
|
||||
GCAdapter::Input(ISIDevice::m_iDeviceNumber, &PadStatus);
|
||||
pad_status = GCAdapter::Input(m_iDeviceNumber);
|
||||
}
|
||||
|
||||
HandleMoviePadStatus(&PadStatus);
|
||||
HandleMoviePadStatus(&pad_status);
|
||||
|
||||
return PadStatus;
|
||||
return pad_status;
|
||||
}
|
||||
|
||||
int CSIDevice_GCAdapter::RunBuffer(u8* buffer, int length)
|
||||
|
||||
@@ -973,7 +973,7 @@ bool NetPlayClient::GetNetPads(const u8 pad_nb, GCPadStatus* pad_status)
|
||||
switch (SConfig::GetInstance().m_SIDevice[local_pad])
|
||||
{
|
||||
case SIDEVICE_WIIU_ADAPTER:
|
||||
GCAdapter::Input(local_pad, pad_status);
|
||||
*pad_status = GCAdapter::Input(local_pad);
|
||||
break;
|
||||
case SIDEVICE_GC_CONTROLLER:
|
||||
default:
|
||||
|
||||
Reference in new issue
Block a user