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:
Jordan Woyak
2011-01-31 08:19:27 +00:00
parent 67a4ac0bf6
commit 1de40588ac
20 changed files with 38 additions and 73 deletions

View File

@ -158,7 +158,6 @@ void DSPLLE::Initialize(void *hWnd, bool bWii, bool bDSPThread)
if (m_bDSPThread)
{
// m_hDSPThread = new Common::Thread(dsp_thread, (void *)this);
m_hDSPThread = std::thread(dsp_thread, this);
}
/*

View File

@ -15,15 +15,12 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#include <functional>
#include "EXI_Device.h"
#include "EXI_DeviceGecko.h"
#include "../Core.h"
void ClientThreadFunc(GeckoSockServer *arg)
{
arg->ClientThread();
}
u16 GeckoSockServer::server_port;
int GeckoSockServer::client_count;
std::thread GeckoSockServer::connectionThread;
@ -104,7 +101,7 @@ bool GeckoSockServer::GetAvailableSock(sf::SocketTCP &sock_to_fill)
recv_fifo = std::queue<u8>();
send_fifo = std::queue<u8>();
}
clientThread = std::thread(ClientThreadFunc, this);
clientThread = std::thread(std::mem_fun(&GeckoSockServer::ClientThread), this);
client_count++;
waiting_socks.pop();
sock_filled = true;

View File

@ -176,7 +176,7 @@ bool Wiimote::Connect()
// Set LEDs
SetLEDs(WIIMOTE_LED_1 << index);
m_wiimote_thread = std::thread(StartThread, this);
m_wiimote_thread = std::thread(std::mem_fun(&Wiimote::ThreadFunc), this);
return true;
}

View File

@ -237,7 +237,7 @@ bool Wiimote::Connect()
// Set LEDs
SetLEDs(WIIMOTE_LED_1 << index);
m_wiimote_thread = std::thread(StartThread, this);
m_wiimote_thread = std::thread(std::mem_fun(&Wiimote::ThreadFunc), this);
NOTICE_LOG(WIIMOTE, "Connected to wiimote %i.", index + 1);

View File

@ -198,7 +198,7 @@ bool Wiimote::Connect()
Handshake();
SetLEDs(WIIMOTE_LED_1 << index);
m_wiimote_thread = std::thread(StartThread, this);
m_wiimote_thread = std::thread(std::mem_fun(&Wiimote::ThreadFunc), this);
[cbt release];

View File

@ -297,11 +297,6 @@ bool Wiimote::SendRequest(unsigned char report_type, unsigned char* data, int le
return (IOWrite(buffer, length + 2) != 0);
}
void Wiimote::StartThread(Wiimote *wiimote)
{
wiimote->ThreadFunc();
}
void Wiimote::ThreadFunc()
{
char thname[] = "Wiimote # Thread";

View File

@ -19,6 +19,8 @@
#ifndef WIIMOTE_REAL_H
#define WIIMOTE_REAL_H
#include <functional>
#include "WiimoteRealBase.h"
#include "ChunkFile.h"
#include "Thread.h"
@ -90,7 +92,6 @@ private:
void SetLEDs(int leds);
int IORead(unsigned char* buf);
int IOWrite(unsigned char* buf, int len);
static void StartThread(Wiimote *wiimote);
void ThreadFunc();
bool m_connected;