mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-09 18:45:40 +00:00
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())
|
if (Movie::IsRecordingInput() || Movie::IsPlayingInput())
|
||||||
AddDevice(Movie::IsUsingPad(i) ? (Movie::IsUsingBongo(i) ? SIDEVICE_GC_TARUKONGA : SIDEVICE_GC_CONTROLLER) : SIDEVICE_NONE, i);
|
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
|
else
|
||||||
AddDevice(SConfig::GetInstance().m_SIDevice[i], i);
|
AddDevice(SConfig::GetInstance().m_SIDevice[i], i);
|
||||||
}
|
}
|
||||||
|
@ -391,3 +391,8 @@ NetPlay* NetPlay::GetNetPlayPtr()
|
|||||||
{
|
{
|
||||||
return netplay_ptr;
|
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);
|
u8 GetPadNum(u8 numPAD);
|
||||||
static NetPlay* GetNetPlayPtr();
|
static NetPlay* GetNetPlayPtr();
|
||||||
|
static bool IsUsingPad(int pad);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//void GetBufferedPad(const u8 pad_nb, NetPad* const netvalues);
|
//void GetBufferedPad(const u8 pad_nb, NetPad* const netvalues);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user