mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Eliminate some trampoline functions.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7015 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -39,11 +39,13 @@
|
||||
|
||||
#include "Thread.h"
|
||||
#include "Timer.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <list>
|
||||
#include <functional>
|
||||
|
||||
struct UDPWiimote::_d
|
||||
{
|
||||
@ -54,12 +56,7 @@ struct UDPWiimote::_d
|
||||
sock_t bipv4_fd,bipv6_fd;
|
||||
};
|
||||
|
||||
int UDPWiimote::noinst=0;
|
||||
|
||||
void UDPWiiThread(UDPWiimote* arg)
|
||||
{
|
||||
arg->mainThread();
|
||||
}
|
||||
int UDPWiimote::noinst = 0;
|
||||
|
||||
UDPWiimote::UDPWiimote(const char *_port, const char * name, int _index) :
|
||||
port(_port), displayName(name),
|
||||
@ -135,7 +132,7 @@ UDPWiimote::UDPWiimote(const char *_port, const char * name, int _index) :
|
||||
initBroadcastIPv4();
|
||||
initBroadcastIPv6();
|
||||
d->termLock.Enter();
|
||||
d->thread = std::thread(UDPWiiThread, this);
|
||||
d->thread = std::thread(std::mem_fun(&UDPWiimote::mainThread), this);
|
||||
d->termLock.Leave();
|
||||
return;
|
||||
}
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
class UDPWiimote
|
||||
{
|
||||
friend void UDPWiiThread(UDPWiimote* arg);
|
||||
public:
|
||||
UDPWiimote(const char * port, const char * name, int index);
|
||||
virtual ~UDPWiimote();
|
||||
@ -33,10 +32,11 @@ public:
|
||||
int getErrNo() {return err;};
|
||||
const char * getPort();
|
||||
void changeName(const char * name);
|
||||
|
||||
void mainThread();
|
||||
private:
|
||||
std::string port,displayName;
|
||||
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;
|
||||
|
Reference in New Issue
Block a user