mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-03 19:41:45 +02:00
GCController: Make HandleMoviePadStatus static
This commit is contained in:
parent
ec5d557895
commit
27eab609dc
@ -38,7 +38,7 @@ GCPadStatus CSIDevice_GCAdapter::GetPadStatus()
|
|||||||
pad_status = GCAdapter::Input(m_device_number);
|
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.
|
// Our GCAdapter code sets PAD_GET_ORIGIN when a new device has been connected.
|
||||||
// Watch for this to calibrate real controllers on connection.
|
// Watch for this to calibrate real controllers on connection.
|
||||||
|
@ -108,27 +108,27 @@ int CSIDevice_GCController::RunBuffer(u8* buffer, int request_length)
|
|||||||
return 0;
|
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();
|
Movie::SetPolledDevice();
|
||||||
if (NetPlay_GetInput(m_device_number, pad_status))
|
if (NetPlay_GetInput(device_number, pad_status))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
else if (Movie::IsPlayingInput())
|
else if (Movie::IsPlayingInput())
|
||||||
{
|
{
|
||||||
Movie::PlayController(pad_status, m_device_number);
|
Movie::PlayController(pad_status, device_number);
|
||||||
Movie::InputUpdate();
|
Movie::InputUpdate();
|
||||||
}
|
}
|
||||||
else if (Movie::IsRecordingInput())
|
else if (Movie::IsRecordingInput())
|
||||||
{
|
{
|
||||||
Movie::RecordInput(pad_status, m_device_number);
|
Movie::RecordInput(pad_status, device_number);
|
||||||
Movie::InputUpdate();
|
Movie::InputUpdate();
|
||||||
}
|
}
|
||||||
else
|
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);
|
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.
|
// Our GCAdapter code sets PAD_GET_ORIGIN when a new device has been connected.
|
||||||
// Watch for this to calibrate real controllers on connection.
|
// Watch for this to calibrate real controllers on connection.
|
||||||
|
@ -105,8 +105,9 @@ public:
|
|||||||
// Direct rumble to the right GC Controller
|
// Direct rumble to the right GC Controller
|
||||||
static void Rumble(int pad_num, ControlState strength);
|
static void Rumble(int pad_num, ControlState strength);
|
||||||
|
|
||||||
|
static void HandleMoviePadStatus(int device_number, GCPadStatus* pad_status);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void HandleMoviePadStatus(GCPadStatus* pad_status);
|
|
||||||
void SetOrigin(const GCPadStatus& pad_status);
|
void SetOrigin(const GCPadStatus& pad_status);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user