mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-12-11 20:37:18 +00:00
Fix building on Linux without bluetooth headers.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6276 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
f8d8445805
commit
77a3a5078e
1
Externals/WiiUse/Src/io_nix.c
vendored
1
Externals/WiiUse/Src/io_nix.c
vendored
@ -39,6 +39,7 @@
|
||||
#include <bluetooth/hci_lib.h>
|
||||
#include <bluetooth/l2cap.h>
|
||||
|
||||
#include "definitions.h"
|
||||
#include "wiiuse_internal.h"
|
||||
|
||||
static int wiiuse_connect_single(struct wiimote_t* wm, char* address);
|
||||
|
5
Externals/WiiUse/Src/wiiuse.c
vendored
5
Externals/WiiUse/Src/wiiuse.c
vendored
@ -37,6 +37,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
@ -122,7 +123,7 @@ struct wiimote_t** wiiuse_init(int wiimotes) {
|
||||
|
||||
wm[i]->unid = i+1;
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined __linux__ && HAVE_BLUEZ
|
||||
wm[i]->bdaddr = *BDADDR_ANY;
|
||||
wm[i]->out_sock = -1;
|
||||
wm[i]->in_sock = -1;
|
||||
@ -159,7 +160,7 @@ void wiiuse_disconnected(struct wiimote_t* wm) {
|
||||
wm->state = WIIMOTE_INIT_STATES;
|
||||
memset(wm->event_buf, 0, sizeof(wm->event_buf));
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined __linux__ && HAVE_BLUEZ
|
||||
wm->out_sock = -1;
|
||||
wm->in_sock = -1;
|
||||
#elif defined(_WIN32)
|
||||
|
5
Externals/WiiUse/Src/wiiuse.h
vendored
5
Externals/WiiUse/Src/wiiuse.h
vendored
@ -48,7 +48,10 @@
|
||||
#include <IOBluetooth/IOBluetoothUserLib.h>
|
||||
#include <string.h>
|
||||
#elif defined(__linux__)
|
||||
#include "config.h"
|
||||
#if HAVE_BLUEZ
|
||||
#include <bluetooth/bluetooth.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef WIIUSE_INTERNAL_H_INCLUDED
|
||||
@ -153,7 +156,7 @@ typedef struct wiimote_t {
|
||||
#if defined(__APPLE__)
|
||||
WCONST IOBluetoothDeviceRef *device;
|
||||
WCONST char bdaddr_str[18];
|
||||
#elif defined(__linux__)
|
||||
#elif defined(__linux__) && HAVE_BLUEZ
|
||||
WCONST bdaddr_t bdaddr; /**< bt address (linux) */
|
||||
WCONST char bdaddr_str[18]; /**< readable bt address */
|
||||
WCONST int out_sock; /**< output socket */
|
||||
|
3
Externals/WiiUse/Src/wiiuse_internal.h
vendored
3
Externals/WiiUse/Src/wiiuse_internal.h
vendored
@ -46,11 +46,8 @@
|
||||
|
||||
#ifdef __linux__
|
||||
#include <arpa/inet.h> /* htons() */
|
||||
#include <bluetooth/bluetooth.h>
|
||||
#endif
|
||||
|
||||
#include "definitions.h"
|
||||
|
||||
/* wiiuse version */
|
||||
#define WIIUSE_VERSION "0.12"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user