mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
Simplify OpenCL compile-time detection on OS X.
Turn wiiuse io_osx.m into Objective-C++. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6398 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -9,7 +9,7 @@ files = [
|
||||
]
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
files += [ "io_osx.m" ]
|
||||
files += [ "io_osx.mm" ]
|
||||
elif sys.platform == 'linux2' and env['HAVE_BLUEZ']:
|
||||
files += [ "io_nix.cpp" ]
|
||||
elif sys.platform == 'win32':
|
||||
@ -18,4 +18,3 @@ else:
|
||||
files += [ "io_dummy.cpp" ]
|
||||
|
||||
env.StaticLibrary(env['local_libs'] + "wiiuse", files)
|
||||
env['CPPPATH'] += ['#Source/Core/wiiuse/Src']
|
||||
|
@ -1,53 +0,0 @@
|
||||
/*
|
||||
* wiiuse
|
||||
*
|
||||
* Written By:
|
||||
* Michael Laforest < para >
|
||||
* Email: < thepara (--AT--) g m a i l [--DOT--] com >
|
||||
*
|
||||
* Copyright 2006-2007
|
||||
*
|
||||
* This file is part of wiiuse.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* $Header$
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief General definitions.
|
||||
*/
|
||||
|
||||
#ifndef DEFINITIONS_H_INCLUDED
|
||||
#define DEFINITIONS_H_INCLUDED
|
||||
|
||||
#include <Common.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <arpa/inet.h> /* htons() */
|
||||
#else
|
||||
/* disable warnings I don't care about */
|
||||
#pragma warning(disable:4244) /* possible loss of data conversion */
|
||||
#pragma warning(disable:4273) /* inconsistent dll linkage */
|
||||
#pragma warning(disable:4217)
|
||||
|
||||
#endif // _WIN32
|
||||
|
||||
/* Convert to big endian */
|
||||
#define BIG_ENDIAN_LONG(i) (htonl(i))
|
||||
#define BIG_ENDIAN_SHORT(i) (htons(i))
|
||||
|
||||
#endif // DEFINITIONS_H_INCLUDED
|
@ -1,4 +1,4 @@
|
||||
#include "definitions.h"
|
||||
#include "Common.h"
|
||||
#include "wiiuse_internal.h"
|
||||
|
||||
int wiiuse_find(struct wiimote_t **wm, int max_wiimotes, int timeout)
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include <bluetooth/hci_lib.h>
|
||||
#include <bluetooth/l2cap.h>
|
||||
|
||||
#include "definitions.h"
|
||||
#include "Common.h"
|
||||
#include "wiiuse_internal.h"
|
||||
|
||||
static int wiiuse_connect_single(struct wiimote_t* wm, char* address);
|
||||
|
@ -32,14 +32,14 @@
|
||||
*/
|
||||
|
||||
#import <CoreServices/CoreServices.h>
|
||||
extern OSErr UpdateSystemActivity(UInt8 activity);
|
||||
extern "C" OSErr UpdateSystemActivity(UInt8 activity);
|
||||
#define BLUETOOTH_VERSION_USE_CURRENT
|
||||
#import <IOBluetooth/objc/IOBluetoothDevice.h>
|
||||
#import <IOBluetooth/objc/IOBluetoothDeviceInquiry.h>
|
||||
#import <IOBluetooth/objc/IOBluetoothHostController.h>
|
||||
#import <IOBluetooth/objc/IOBluetoothL2CAPChannel.h>
|
||||
|
||||
#include "definitions.h"
|
||||
#include "Common.h"
|
||||
#include "wiiuse_internal.h"
|
||||
|
||||
static int wiiuse_connect_single(struct wiimote_t *wm, char *address);
|
||||
@ -49,7 +49,7 @@ IOBluetoothL2CAPChannel *ichan;
|
||||
IOBluetoothL2CAPChannel *cchan;
|
||||
|
||||
#define QUEUE_SIZE 64
|
||||
volatile struct buffer {
|
||||
struct buffer {
|
||||
char data[MAX_PAYLOAD];
|
||||
int len;
|
||||
} queue[QUEUE_SIZE];
|
@ -40,11 +40,9 @@
|
||||
#include <dbt.h>
|
||||
#include <setupapi.h>
|
||||
|
||||
#include "definitions.h"
|
||||
#include "Common.h"
|
||||
#include "wiiuse_internal.h"
|
||||
|
||||
#include <Common.h>
|
||||
|
||||
typedef struct _HIDD_ATTRIBUTES {
|
||||
ULONG Size;
|
||||
USHORT VendorID;
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "definitions.h"
|
||||
#include "Common.h"
|
||||
#include "wiiuse_internal.h"
|
||||
|
||||
static int get_ir_sens(struct wiimote_t* wm, const char** block1, const char** block2);
|
||||
|
@ -45,10 +45,9 @@
|
||||
#include <Winsock2.h>
|
||||
#endif
|
||||
|
||||
#include "definitions.h"
|
||||
#include "Common.h"
|
||||
#include "wiiuse_internal.h"
|
||||
|
||||
|
||||
static int g_banner = 1;
|
||||
|
||||
/**
|
||||
@ -301,7 +300,7 @@ int wiiuse_write_data(struct wiimote_t* wm, unsigned int addr, byte* data, byte
|
||||
#endif
|
||||
|
||||
/* the offset is in big endian */
|
||||
*(int*)(buf) = BIG_ENDIAN_LONG(addr);
|
||||
*(int*)(buf) = Common::swap32(addr); /* XXX only if little-endian */
|
||||
|
||||
/* length */
|
||||
*(byte*)(buf + 4) = len;
|
||||
|
Reference in New Issue
Block a user