GCController: Make HandleMoviePadStatus static

This commit is contained in:
Bonta 2021-07-04 12:55:37 +02:00
parent ec5d557895
commit 27eab609dc
3 changed files with 10 additions and 9 deletions

View File

@ -38,7 +38,7 @@ GCPadStatus CSIDevice_GCAdapter::GetPadStatus()
pad_status = GCAdapter::Input(m_device_number);
}
HandleMoviePadStatus(&pad_status);
HandleMoviePadStatus(m_device_number, &pad_status);
// Our GCAdapter code sets PAD_GET_ORIGIN when a new device has been connected.
// Watch for this to calibrate real controllers on connection.

View File

@ -108,27 +108,27 @@ int CSIDevice_GCController::RunBuffer(u8* buffer, int request_length)
return 0;
}
void CSIDevice_GCController::HandleMoviePadStatus(GCPadStatus* pad_status)
void CSIDevice_GCController::HandleMoviePadStatus(int device_number, GCPadStatus* pad_status)
{
Movie::CallGCInputManip(pad_status, m_device_number);
Movie::CallGCInputManip(pad_status, device_number);
Movie::SetPolledDevice();
if (NetPlay_GetInput(m_device_number, pad_status))
if (NetPlay_GetInput(device_number, pad_status))
{
}
else if (Movie::IsPlayingInput())
{
Movie::PlayController(pad_status, m_device_number);
Movie::PlayController(pad_status, device_number);
Movie::InputUpdate();
}
else if (Movie::IsRecordingInput())
{
Movie::RecordInput(pad_status, m_device_number);
Movie::RecordInput(pad_status, device_number);
Movie::InputUpdate();
}
else
{
Movie::CheckPadStatus(pad_status, m_device_number);
Movie::CheckPadStatus(pad_status, device_number);
}
}
@ -143,7 +143,7 @@ GCPadStatus CSIDevice_GCController::GetPadStatus()
pad_status = Pad::GetStatus(m_device_number);
}
HandleMoviePadStatus(&pad_status);
HandleMoviePadStatus(m_device_number, &pad_status);
// Our GCAdapter code sets PAD_GET_ORIGIN when a new device has been connected.
// Watch for this to calibrate real controllers on connection.

View File

@ -105,8 +105,9 @@ public:
// Direct rumble to the right GC Controller
static void Rumble(int pad_num, ControlState strength);
static void HandleMoviePadStatus(int device_number, GCPadStatus* pad_status);
protected:
void HandleMoviePadStatus(GCPadStatus* pad_status);
void SetOrigin(const GCPadStatus& pad_status);
};