mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -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:
@ -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);
|
||||
}
|
||||
/*
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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];
|
||||
|
||||
|
@ -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";
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user