basic fixoring.
This commit is contained in:
parent
cae725ffeb
commit
ead4f35705
|
@ -61,6 +61,8 @@
|
|||
#include "ui_LANStartClientDialog.h"
|
||||
#include "ui_LANDialog.h"
|
||||
|
||||
using namespace melonDS;
|
||||
|
||||
|
||||
extern EmuThread* emuThread;
|
||||
LANStartClientDialog* lanClientDlg = nullptr;
|
||||
|
|
|
@ -42,18 +42,18 @@ struct Player
|
|||
int ID;
|
||||
char Name[32];
|
||||
int Status; // 0=no player 1=normal 2=host 3=connecting 4=disconnected
|
||||
u32 Address;
|
||||
melonDS::u32 Address;
|
||||
};
|
||||
|
||||
struct DiscoveryData
|
||||
{
|
||||
u32 Magic;
|
||||
u32 Version;
|
||||
u32 Tick;
|
||||
melonDS::u32 Magic;
|
||||
melonDS::u32 Version;
|
||||
melonDS::u32 Tick;
|
||||
char SessionName[64];
|
||||
u8 NumPlayers;
|
||||
u8 MaxPlayers;
|
||||
u8 Status; // 0=idle 1=playing
|
||||
melonDS::u8 NumPlayers;
|
||||
melonDS::u8 MaxPlayers;
|
||||
melonDS::u8 Status; // 0=idle 1=playing
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -141,11 +141,11 @@ private:
|
|||
Ui::LANDialog* ui;
|
||||
|
||||
LAN::Player playerList[16];
|
||||
u32 playerPing[16];
|
||||
melonDS::u32 playerPing[16];
|
||||
int numPlayers;
|
||||
int maxPlayers;
|
||||
int myPlayerID;
|
||||
u32 hostAddress;
|
||||
melonDS::u32 hostAddress;
|
||||
QMutex playerListMutex;
|
||||
};
|
||||
|
||||
|
@ -154,16 +154,16 @@ namespace LAN
|
|||
|
||||
extern bool Active;
|
||||
|
||||
extern std::map<u32, DiscoveryData> DiscoveryList;
|
||||
extern std::map<melonDS::u32, DiscoveryData> DiscoveryList;
|
||||
extern QMutex DiscoveryMutex;
|
||||
|
||||
extern Player Players[16];
|
||||
extern u32 PlayerPing[16];
|
||||
extern melonDS::u32 PlayerPing[16];
|
||||
extern int NumPlayers;
|
||||
extern int MaxPlayers;
|
||||
|
||||
extern Player MyPlayer;
|
||||
extern u32 HostAddress;
|
||||
extern melonDS::u32 HostAddress;
|
||||
|
||||
bool Init();
|
||||
void DeInit();
|
||||
|
@ -179,13 +179,13 @@ void SetMPRecvTimeout(int timeout);
|
|||
void MPBegin();
|
||||
void MPEnd();
|
||||
|
||||
int SendMPPacket(u8* data, int len, u64 timestamp);
|
||||
int RecvMPPacket(u8* data, u64* timestamp);
|
||||
int SendMPCmd(u8* data, int len, u64 timestamp);
|
||||
int SendMPReply(u8* data, int len, u64 timestamp, u16 aid);
|
||||
int SendMPAck(u8* data, int len, u64 timestamp);
|
||||
int RecvMPHostPacket(u8* data, u64* timestamp);
|
||||
u16 RecvMPReplies(u8* data, u64 timestamp, u16 aidmask);
|
||||
int SendMPPacket(melonDS::u8* data, int len, melonDS::u64 timestamp);
|
||||
int RecvMPPacket(melonDS::u8* data, melonDS::u64* timestamp);
|
||||
int SendMPCmd(melonDS::u8* data, int len, melonDS::u64 timestamp);
|
||||
int SendMPReply(melonDS::u8* data, int len, melonDS::u64 timestamp, melonDS::u16 aid);
|
||||
int SendMPAck(melonDS::u8* data, int len, melonDS::u64 timestamp);
|
||||
int RecvMPHostPacket(melonDS::u8* data, melonDS::u64* timestamp);
|
||||
melonDS::u16 RecvMPReplies(melonDS::u8* data, melonDS::u64 timestamp, melonDS::u16 aidmask);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,8 @@
|
|||
#include "ui_NetplayStartClientDialog.h"
|
||||
#include "ui_NetplayDialog.h"
|
||||
|
||||
using namespace melonDS;
|
||||
|
||||
|
||||
extern EmuThread* emuThread;
|
||||
NetplayDialog* netplayDlg;
|
||||
|
|
|
@ -42,7 +42,7 @@ struct Player
|
|||
int ID;
|
||||
char Name[32];
|
||||
int Status; // 0=no player 1=normal 2=host 3=connecting
|
||||
u32 Address;
|
||||
melonDS::u32 Address;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ void StartHost(const char* player, int port);
|
|||
void StartClient(const char* player, const char* host, int port);
|
||||
void StartMirror(const Player* player);
|
||||
|
||||
u32 PlayerAddress(int id);
|
||||
melonDS::u32 PlayerAddress(int id);
|
||||
|
||||
void StartGame();
|
||||
void StartLocal();
|
||||
|
|
Loading…
Reference in New Issue