A multi-interface listener, threaded approach to UDPWii

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5821 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
dapetcu21
2010-07-03 04:56:37 +00:00
parent 12a676c273
commit 0dc8833396
3 changed files with 168 additions and 89 deletions

View File

@ -23,15 +23,15 @@ class UDPWiimote
public:
UDPWiimote(const char * port);
virtual ~UDPWiimote();
void update();
void getAccel(int &x, int &y, int &z);
u32 getButtons();
void getNunchuck(float &x, float &y, u8 &mask);
void getIR(float &x, float &y);
int getErrNo() {return err;};
private:
int readPack(void * data, int *size);
struct _d; //using pimpl because SOCKET on windows is defined in Winsock2.h, witch doesen't have include guards
int pharsePacket(u8 * data, size_t size);
void mainThread();
struct _d; //using pimpl because Winsock2.h doesen't have include guards -_-
_d *d;
double x,y,z;
double nunX,nunY;
@ -40,5 +40,8 @@ private:
u32 mask;
int err;
static int noinst;
friend void _UDPWiiThread(void* arg);
void broadcastPresence();
u8 time;
};
#endif