Automatically connect the appropriate controllers for netplay.
This commit is contained in:
parent
0e1efd7d38
commit
919e54c695
|
@ -262,6 +262,8 @@ void Init()
|
|||
|
||||
if (Movie::IsRecordingInput() || Movie::IsPlayingInput())
|
||||
AddDevice(Movie::IsUsingPad(i) ? (Movie::IsUsingBongo(i) ? SIDEVICE_GC_TARUKONGA : SIDEVICE_GC_CONTROLLER) : SIDEVICE_NONE, i);
|
||||
else if (NetPlay::GetNetPlayPtr())
|
||||
AddDevice(NetPlay::IsUsingPad(i) ? SIDEVICE_GC_CONTROLLER : SIDEVICE_NONE, i);
|
||||
else
|
||||
AddDevice(SConfig::GetInstance().m_SIDevice[i], i);
|
||||
}
|
||||
|
|
|
@ -391,3 +391,8 @@ NetPlay* NetPlay::GetNetPlayPtr()
|
|||
{
|
||||
return netplay_ptr;
|
||||
}
|
||||
|
||||
bool NetPlay::IsUsingPad(int pad)
|
||||
{
|
||||
return netplay_ptr->m_local_player->pad_map[pad] != -1;
|
||||
}
|
|
@ -120,6 +120,7 @@ public:
|
|||
|
||||
u8 GetPadNum(u8 numPAD);
|
||||
static NetPlay* GetNetPlayPtr();
|
||||
static bool IsUsingPad(int pad);
|
||||
|
||||
protected:
|
||||
//void GetBufferedPad(const u8 pad_nb, NetPad* const netvalues);
|
||||
|
|
Loading…
Reference in New Issue