mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
fix osx build, and first step to get real wiimotes on osx
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2277 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
82a10c9692
commit
cf8220dc9c
10
Externals/WiiUseSrc/Src/SConscript
vendored
10
Externals/WiiUseSrc/Src/SConscript
vendored
@ -1,8 +1,9 @@
|
||||
# -*- python -*-
|
||||
|
||||
import sys
|
||||
Import('env')
|
||||
|
||||
if not env['HAVE_BLUEZ']:
|
||||
if not (env['HAVE_BLUEZ'] or sys.platform == 'darwin'):
|
||||
env['HAVE_WIIUSE'] = 0
|
||||
Return()
|
||||
|
||||
@ -11,13 +12,18 @@ files = [
|
||||
"dynamics.c",
|
||||
"events.c",
|
||||
"io.c",
|
||||
"io_nix.c",
|
||||
"ir.c",
|
||||
"nunchuk.c",
|
||||
"guitar_hero_3.c",
|
||||
"wiiuse.c",
|
||||
]
|
||||
|
||||
if env['HAVE_BLUEZ']:
|
||||
files += [ "io_nix.c", ]
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
files += [ "io_osx.c", ]
|
||||
|
||||
env_wiiuse = env.Clone(
|
||||
CCFLAGS = env.filterWarnings(env['CCFLAGS']) + ' -fvisibility=default',
|
||||
CXXFLAGS = env.filterWarnings(env['CXXFLAGS']),
|
||||
|
2
Externals/WiiUseSrc/Src/io.h
vendored
2
Externals/WiiUseSrc/Src/io.h
vendored
@ -35,8 +35,10 @@
|
||||
#define CONNECT_H_INCLUDED
|
||||
|
||||
#ifndef WIN32
|
||||
#if !defined(__APPLE__)
|
||||
#include <bluetooth/bluetooth.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "wiiuse_internal.h"
|
||||
|
||||
|
2
Externals/WiiUseSrc/Src/wiiuse.c
vendored
2
Externals/WiiUseSrc/Src/wiiuse.c
vendored
@ -124,9 +124,11 @@ struct wiimote_t** wiiuse_init(int wiimotes) {
|
||||
wm[i]->unid = i+1;
|
||||
|
||||
#ifndef WIN32
|
||||
#if !defined(__APPLE__)
|
||||
wm[i]->bdaddr = *BDADDR_ANY;
|
||||
wm[i]->out_sock = -1;
|
||||
wm[i]->in_sock = -1;
|
||||
#endif
|
||||
#else
|
||||
wm[i]->dev_handle = 0;
|
||||
wm[i]->stack = WIIUSE_STACK_UNKNOWN;
|
||||
|
6
Externals/WiiUseSrc/Src/wiiuse.h
vendored
6
Externals/WiiUseSrc/Src/wiiuse.h
vendored
@ -42,6 +42,8 @@
|
||||
#ifdef _WIN32
|
||||
/* windows */
|
||||
#include <windows.h>
|
||||
#elif defined(__APPLE__)
|
||||
#include <string.h>
|
||||
#else
|
||||
/* nix */
|
||||
#include <bluetooth/bluetooth.h>
|
||||
@ -533,7 +535,11 @@ typedef struct wiimote_t {
|
||||
WCONST int unid; /**< user specified id */
|
||||
|
||||
#ifndef WIN32
|
||||
#if defined(__APPLE__)
|
||||
WCONST char bdaddr[10]; /**< bt address on osx addr are string */
|
||||
#else
|
||||
WCONST bdaddr_t bdaddr; /**< bt address */
|
||||
#endif
|
||||
WCONST char bdaddr_str[18]; /**< readable bt address */
|
||||
WCONST int out_sock; /**< output socket */
|
||||
WCONST int in_sock; /**< input socket */
|
||||
|
2
Externals/WiiUseSrc/Src/wiiuse_internal.h
vendored
2
Externals/WiiUseSrc/Src/wiiuse_internal.h
vendored
@ -45,9 +45,11 @@
|
||||
#define WIIUSE_INTERNAL_H_INCLUDED
|
||||
|
||||
#ifndef WIN32
|
||||
#if !defined(__APPLE__)
|
||||
#include <arpa/inet.h> /* htons() */
|
||||
#include <bluetooth/bluetooth.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "definitions.h"
|
||||
|
||||
|
@ -160,6 +160,7 @@ void ConfigDialog::UpdateGUIButtonMapping(int controller)
|
||||
m_TiltInvertPitch[controller]->SetValue(WiiMoteEmu::PadMapping[controller].bPitchInvert);
|
||||
|
||||
// Wiimote
|
||||
#ifdef _WIN32
|
||||
m_bWmA[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Wm.A).c_str()));
|
||||
m_bWmB[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Wm.B).c_str()));
|
||||
m_bWm1[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Wm.One).c_str()));
|
||||
@ -183,6 +184,7 @@ void ConfigDialog::UpdateGUIButtonMapping(int controller)
|
||||
m_bNcU[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Nc.U).c_str()));
|
||||
m_bNcD[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Nc.D).c_str()));
|
||||
m_bNcShake[controller]->SetLabel(wxString::FromAscii(InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Nc.Shake).c_str()));
|
||||
#endif
|
||||
|
||||
//Console::Print("m_bWmA[%i] = %i = %s\n", controller, WiiMoteEmu::PadMapping[controller].Wm.A, InputCommon::VKToString(WiiMoteEmu::PadMapping[controller].Wm.A).c_str());
|
||||
}
|
||||
@ -754,4 +756,4 @@ void ConfigDialog::UpdatePad(wxTimerEvent& WXUNUSED(event))
|
||||
|
||||
PadGetStatus();
|
||||
}
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user