mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Made new Wiimote plugin not deinit SDL on shutdown. (Hacks, same thing old wiimote does, fixes the crash on emulation stop, refresh button still causes crash (damn SDL)) Minor new input plugin GUI changes. (left-click on rumble button opens control config dialog) Made NetPlay save/load settings to Dolphin.ini. Allow NetPlay host to adjust which/how many pads will be used in game. (more than one gamepad per Dolphin instance can be used on NetPlay) Worked on wiimote NetPlay a bit. (still nonfunctional) Improved SDL device numbering. Added some major hacks to ControllerInterface/SDL so XInput(360 controller) devices do not have their SDL interface shown in the device list on windows. (caused confusion for users)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5625 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -32,16 +32,13 @@ public:
|
||||
u32 nLo;
|
||||
};
|
||||
|
||||
class NetWiimote
|
||||
struct Rpt : public std::vector<u8>
|
||||
{
|
||||
public:
|
||||
NetWiimote& operator=(const NetWiimote&);
|
||||
NetWiimote(const u32 _size) : size(_size), data(new u8[size]) {}
|
||||
|
||||
const u32 size;
|
||||
u8* const data;
|
||||
u16 channel;
|
||||
};
|
||||
|
||||
typedef std::vector<Rpt> NetWiimote;
|
||||
|
||||
#define NETPLAY_VERSION "Dolphin NetPlay 2.2"
|
||||
|
||||
#ifdef _M_X64
|
||||
@ -124,7 +121,7 @@ public:
|
||||
void WiimoteUpdate(int _number);
|
||||
bool GetNetPads(const u8 pad_nb, const SPADStatus* const, NetPad* const netvalues);
|
||||
virtual bool ChangeGame(const std::string& game) = 0;
|
||||
virtual void GetPlayerList(std::string& list) = 0;
|
||||
virtual void GetPlayerList(std::string& list, std::vector<int>& pid_list) = 0;
|
||||
virtual void SendChatMessage(const std::string& msg) = 0;
|
||||
|
||||
virtual bool StartGame(const std::string &path);
|
||||
@ -161,11 +158,10 @@ protected:
|
||||
std::string revision;
|
||||
};
|
||||
|
||||
//LockingQueue<NetPad> m_pad_buffer[4];
|
||||
std::queue<NetPad> m_pad_buffer[4];
|
||||
std::map<FrameNum, NetWiimote> m_wiimote_buffer[4];
|
||||
std::queue<NetPad> m_pad_buffer[4];
|
||||
std::queue<NetWiimote> m_wiimote_buffer[4];
|
||||
|
||||
FrameNum m_wiimote_update_frame;
|
||||
NetWiimote m_wiimote_input[4];
|
||||
|
||||
NetPlayDiag* m_dialog;
|
||||
sf::SocketTCP m_socket;
|
||||
@ -197,7 +193,7 @@ public:
|
||||
NetPlayServer(const u16 port, const std::string& name, NetPlayDiag* const npd = NULL, const std::string& game = "");
|
||||
~NetPlayServer();
|
||||
|
||||
void GetPlayerList(std::string& list);
|
||||
void GetPlayerList(std::string& list, std::vector<int>& pid_list);
|
||||
|
||||
// Send and receive pads values
|
||||
//bool GetNetPads(const u8 pad_nb, const SPADStatus* const, NetPad* const netvalues);
|
||||
@ -207,6 +203,9 @@ public:
|
||||
bool StartGame(const std::string &path);
|
||||
bool StopGame();
|
||||
|
||||
bool GetPadMapping(const int pid, int map[]);
|
||||
bool SetPadMapping(const int pid, const int map[]);
|
||||
|
||||
u64 CalculateMinimumBufferTime();
|
||||
void AdjustPadBufferSize(unsigned int size);
|
||||
|
||||
@ -226,6 +225,7 @@ private:
|
||||
unsigned int OnConnect(sf::SocketTCP& socket);
|
||||
unsigned int OnDisconnect(sf::SocketTCP& socket);
|
||||
unsigned int OnData(sf::Packet& packet, sf::SocketTCP& socket);
|
||||
void UpdatePadMapping();
|
||||
|
||||
std::map<sf::SocketTCP, Client> m_players;
|
||||
|
||||
@ -242,7 +242,7 @@ public:
|
||||
NetPlayClient(const std::string& address, const u16 port, const std::string& name, NetPlayDiag* const npd = NULL);
|
||||
~NetPlayClient();
|
||||
|
||||
void GetPlayerList(std::string& list);
|
||||
void GetPlayerList(std::string& list, std::vector<int>& pid_list);
|
||||
|
||||
// Send and receive pads values
|
||||
//bool GetNetPads(const u8 pad_nb, const SPADStatus* const, NetPad* const netvalues);
|
||||
|
Reference in New Issue
Block a user