mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
GCAdapter: Return input state by value
This commit is contained in:
@ -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