mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
This should fix wiimote extensions on linux. Now to figure out the windows issue, and then OSX ... Sigh!
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6702 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -223,7 +223,7 @@ unsigned char *Wiimote::IORead()
|
|||||||
|
|
||||||
// Read the pending message into the buffer
|
// Read the pending message into the buffer
|
||||||
unsigned char *buffer = new unsigned char[MAX_PAYLOAD];
|
unsigned char *buffer = new unsigned char[MAX_PAYLOAD];
|
||||||
r = read(in_sock, buffer, sizeof(buffer));
|
r = read(in_sock, buffer, sizeof(unsigned char) * MAX_PAYLOAD);
|
||||||
if (r == -1)
|
if (r == -1)
|
||||||
{
|
{
|
||||||
// Error reading data
|
// Error reading data
|
||||||
|
@ -55,7 +55,7 @@ Wiimote::Wiimote(const unsigned int _index)
|
|||||||
#elif defined(_WIN32)
|
#elif defined(_WIN32)
|
||||||
, dev_handle(0), stack(MSBT_STACK_UNKNOWN)
|
, dev_handle(0), stack(MSBT_STACK_UNKNOWN)
|
||||||
#endif
|
#endif
|
||||||
, leds(0) , m_last_data_report(NULL) , m_channel(0) , m_connected(false)
|
, leds(0), m_last_data_report(NULL), m_channel(0), m_connected(false)
|
||||||
{
|
{
|
||||||
#if defined(__linux__) && HAVE_BLUEZ
|
#if defined(__linux__) && HAVE_BLUEZ
|
||||||
bdaddr = (bdaddr_t){{0, 0, 0, 0, 0, 0}};
|
bdaddr = (bdaddr_t){{0, 0, 0, 0, 0, 0}};
|
||||||
|
@ -42,8 +42,8 @@ namespace WiimoteReal
|
|||||||
|
|
||||||
class Wiimote
|
class Wiimote
|
||||||
{
|
{
|
||||||
friend class WiimoteEmu::Wiimote;
|
friend class WiimoteEmu::Wiimote;
|
||||||
public:
|
public:
|
||||||
Wiimote(const unsigned int _index);
|
Wiimote(const unsigned int _index);
|
||||||
~Wiimote();
|
~Wiimote();
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ class Wiimote
|
|||||||
IOBluetoothDevice *btd;
|
IOBluetoothDevice *btd;
|
||||||
IOBluetoothL2CAPChannel *ichan;
|
IOBluetoothL2CAPChannel *ichan;
|
||||||
IOBluetoothL2CAPChannel *cchan;
|
IOBluetoothL2CAPChannel *cchan;
|
||||||
#define QUEUE_SIZE 64
|
#define QUEUE_SIZE 64
|
||||||
struct qbuffer
|
struct qbuffer
|
||||||
{
|
{
|
||||||
char data[MAX_PAYLOAD];
|
char data[MAX_PAYLOAD];
|
||||||
@ -94,11 +94,11 @@ class Wiimote
|
|||||||
#endif
|
#endif
|
||||||
unsigned char leds; // Currently lit leds
|
unsigned char leds; // Currently lit leds
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
u8 *m_last_data_report;
|
u8 *m_last_data_report;
|
||||||
u16 m_channel;
|
u16 m_channel;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void ClearReadQueue();
|
void ClearReadQueue();
|
||||||
void RealDisconnect();
|
void RealDisconnect();
|
||||||
bool SendRequest(unsigned char report_type, unsigned char* data, int length);
|
bool SendRequest(unsigned char report_type, unsigned char* data, int length);
|
||||||
|
Reference in New Issue
Block a user