mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 07:45:33 +01:00
parent
fcf5d4f6bc
commit
330289cf71
@ -16,6 +16,7 @@
|
|||||||
#include "Core/HW/SI_DeviceGCController.h"
|
#include "Core/HW/SI_DeviceGCController.h"
|
||||||
#include "Core/HW/Sram.h"
|
#include "Core/HW/Sram.h"
|
||||||
#include "Core/HW/WiimoteEmu/WiimoteEmu.h"
|
#include "Core/HW/WiimoteEmu/WiimoteEmu.h"
|
||||||
|
#include "Core/HW/WiimoteReal/WiimoteReal.h"
|
||||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_usb.h"
|
#include "Core/IPC_HLE/WII_IPC_HLE_Device_usb.h"
|
||||||
#include "Core/Movie.h"
|
#include "Core/Movie.h"
|
||||||
#include "InputCommon/GCAdapter.h"
|
#include "InputCommon/GCAdapter.h"
|
||||||
@ -712,6 +713,25 @@ bool NetPlayClient::StartGame(const std::string& path)
|
|||||||
|
|
||||||
m_dialog->BootGame(path);
|
m_dialog->BootGame(path);
|
||||||
|
|
||||||
|
if (SConfig::GetInstance().bWii)
|
||||||
|
{
|
||||||
|
for (unsigned int i = 0; i < 4; ++i)
|
||||||
|
WiimoteReal::ChangeWiimoteSource(i,
|
||||||
|
m_wiimote_map[i] > 0 ? WIIMOTE_SRC_EMU : WIIMOTE_SRC_NONE);
|
||||||
|
|
||||||
|
// Needed to prevent locking up at boot if (when) the wiimotes connect out of order.
|
||||||
|
NetWiimote nw;
|
||||||
|
nw.resize(4, 0);
|
||||||
|
|
||||||
|
for (unsigned int w = 0; w < 4; ++w)
|
||||||
|
{
|
||||||
|
if (m_wiimote_map[w] != -1)
|
||||||
|
// probably overkill, but whatever
|
||||||
|
for (unsigned int i = 0; i < 7; ++i)
|
||||||
|
m_wiimote_buffer[w].Push(nw);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
UpdateDevices();
|
UpdateDevices();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -138,7 +138,7 @@ NetPlaySetupFrame::NetPlaySetupFrame(wxWindow* const parent, const CGameListCtrl
|
|||||||
"If DSP LLE is used, DSP ROMs must be identical between players.\n"
|
"If DSP LLE is used, DSP ROMs must be identical between players.\n"
|
||||||
"If connecting directly, the host must have the chosen UDP port open/forwarded!\n"
|
"If connecting directly, the host must have the chosen UDP port open/forwarded!\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Wiimote support is broken in netplay and therefore disabled.\n"));
|
"Wiimote netplay is experimental and should not be expected to work.\n"));
|
||||||
|
|
||||||
wxBoxSizer* const top_szr = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* const top_szr = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
|
||||||
|
@ -66,6 +66,11 @@ PadMappingArray PadMapDialog::GetModifiedPadMappings() const
|
|||||||
return m_pad_mapping;
|
return m_pad_mapping;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PadMappingArray PadMapDialog::GetModifiedWiimoteMappings() const
|
||||||
|
{
|
||||||
|
return m_wii_mapping;
|
||||||
|
}
|
||||||
|
|
||||||
void PadMapDialog::OnAdjust(wxCommandEvent& WXUNUSED(event))
|
void PadMapDialog::OnAdjust(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
for (unsigned int i = 0; i < 4; i++)
|
for (unsigned int i = 0; i < 4; i++)
|
||||||
@ -75,5 +80,11 @@ void PadMapDialog::OnAdjust(wxCommandEvent& WXUNUSED(event))
|
|||||||
m_pad_mapping[i] = m_player_list[player_idx - 1]->pid;
|
m_pad_mapping[i] = m_player_list[player_idx - 1]->pid;
|
||||||
else
|
else
|
||||||
m_pad_mapping[i] = -1;
|
m_pad_mapping[i] = -1;
|
||||||
|
|
||||||
|
player_idx = m_map_cbox[i + 4]->GetSelection();
|
||||||
|
if (player_idx > 0)
|
||||||
|
m_wii_mapping[i] = m_player_list[player_idx - 1]->pid;
|
||||||
|
else
|
||||||
|
m_wii_mapping[i] = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,11 +20,13 @@ public:
|
|||||||
PadMapDialog(wxWindow* parent, NetPlayServer* server, NetPlayClient* client);
|
PadMapDialog(wxWindow* parent, NetPlayServer* server, NetPlayClient* client);
|
||||||
|
|
||||||
PadMappingArray GetModifiedPadMappings() const;
|
PadMappingArray GetModifiedPadMappings() const;
|
||||||
|
PadMappingArray GetModifiedWiimoteMappings() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void OnAdjust(wxCommandEvent& event);
|
void OnAdjust(wxCommandEvent& event);
|
||||||
|
|
||||||
wxChoice* m_map_cbox[4];
|
wxChoice* m_map_cbox[8];
|
||||||
PadMappingArray m_pad_mapping;
|
PadMappingArray m_pad_mapping;
|
||||||
|
PadMappingArray m_wii_mapping;
|
||||||
std::vector<const Player*> m_player_list;
|
std::vector<const Player*> m_player_list;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user