mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
(requires review for windows/mac)
Fix up so that various libraries wont be fatal for build with scons wiiuse lib is used only if HAVE_WIIUSE is defined to 1 made major cleanup for darwin and osx64 git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1404 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
7
Externals/WiiUseSrc/Src/SConscript
vendored
7
Externals/WiiUseSrc/Src/SConscript
vendored
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
Import('env')
|
Import('env')
|
||||||
|
|
||||||
|
if not env['HAVE_BLUEZ']:
|
||||||
|
env['HAVE_WIIUSE'] = 0
|
||||||
|
Return()
|
||||||
|
|
||||||
files = [
|
files = [
|
||||||
"classic.c",
|
"classic.c",
|
||||||
"dynamics.c",
|
"dynamics.c",
|
||||||
@ -22,4 +26,7 @@ env_wiiuse = env.Clone(
|
|||||||
libs = [
|
libs = [
|
||||||
'm',
|
'm',
|
||||||
]
|
]
|
||||||
|
|
||||||
env_wiiuse.SharedLibrary(env['libs_dir']+"wiiuse", files, LIBS=libs)
|
env_wiiuse.SharedLibrary(env['libs_dir']+"wiiuse", files, LIBS=libs)
|
||||||
|
|
||||||
|
env['HAVE_WIIUSE'] = 1
|
||||||
|
81
SConstruct
81
SConstruct
@ -41,8 +41,7 @@ cppDefines = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
if sys.platform == 'darwin':
|
|
||||||
compileFlags += [ '-I/opt/local/include' ]
|
|
||||||
|
|
||||||
include_paths = [
|
include_paths = [
|
||||||
'../../../Core/Common/Src',
|
'../../../Core/Common/Src',
|
||||||
@ -74,6 +73,7 @@ dirs = [
|
|||||||
'Source/Plugins/Plugin_nJoy_Testing/Src',
|
'Source/Plugins/Plugin_nJoy_Testing/Src',
|
||||||
'Source/Plugins/Plugin_Wiimote/Src',
|
'Source/Plugins/Plugin_Wiimote/Src',
|
||||||
'Source/Core/DolphinWX/Src',
|
'Source/Core/DolphinWX/Src',
|
||||||
|
'Source/Core/DebuggerWX/Src',
|
||||||
]
|
]
|
||||||
|
|
||||||
builders = {}
|
builders = {}
|
||||||
@ -86,6 +86,7 @@ if sys.platform == 'darwin':
|
|||||||
for dstNode in target:
|
for dstNode in target:
|
||||||
writePlist(properties, str(dstNode))
|
writePlist(properties, str(dstNode))
|
||||||
builders['Plist'] = Builder(action = createPlist)
|
builders['Plist'] = Builder(action = createPlist)
|
||||||
|
compileFlags += [ '-I/opt/local/include' ]
|
||||||
|
|
||||||
lib_paths = include_paths
|
lib_paths = include_paths
|
||||||
|
|
||||||
@ -173,57 +174,60 @@ tests = {'CheckWXConfig' : wxconfig.CheckWXConfig,
|
|||||||
'CheckPKG' : utils.CheckPKG,
|
'CheckPKG' : utils.CheckPKG,
|
||||||
'CheckSDL' : utils.CheckSDL}
|
'CheckSDL' : utils.CheckSDL}
|
||||||
|
|
||||||
conf = env.Configure(custom_tests = tests)
|
conf = env.Configure(custom_tests = tests,
|
||||||
|
config_h="Source/Core/Common/Src/Config.h")
|
||||||
|
|
||||||
if not conf.CheckPKGConfig('0.15.0'):
|
if not conf.CheckPKGConfig('0.15.0'):
|
||||||
Exit(1)
|
print "Can't find pkg-config, some tests will fail"
|
||||||
|
|
||||||
if not env['osx64']:
|
env['HAVE_SDL'] = conf.CheckSDL('1.0.0')
|
||||||
if not conf.CheckSDL('1.0.0'):
|
|
||||||
Exit(1)
|
|
||||||
|
|
||||||
if not conf.CheckPKG('bluez'):
|
# Bluetooth for wii support
|
||||||
Exit(1)
|
env['HAVE_BLUEZ'] = conf.CheckPKG('bluez')
|
||||||
|
|
||||||
if not env['osx64']:
|
# needed for sound
|
||||||
if not conf.CheckPKG('ao'):
|
env['HAVE_AO'] = conf.CheckPKG('ao')
|
||||||
Exit(1)
|
|
||||||
|
|
||||||
# handling wx flags CCFLAGS should be created before
|
# handling wx flags CCFLAGS should be created before
|
||||||
if not env['nowx']:
|
env['HAVE_WX'] = conf.CheckWXConfig('2.8', ['gl', 'adv', 'core', 'base'],
|
||||||
if not env['osx64']:
|
env['debug'])
|
||||||
if not conf.CheckWXConfig(
|
|
||||||
'2.8', ['gl', 'adv', 'core', 'base'], env['debug']
|
|
||||||
):
|
|
||||||
print 'gui build requires wxwidgets >= 2.8'
|
|
||||||
Exit(1)
|
|
||||||
if not env['nowx']:
|
|
||||||
if not env['osx64']:
|
|
||||||
dirs += ['Source/Core/DebuggerWX/Src',]
|
|
||||||
|
|
||||||
# After all configuration tests are done
|
#osx 64 specifics
|
||||||
env = conf.Finish()
|
|
||||||
|
|
||||||
#wx windows flags
|
|
||||||
if not env['nowx']:
|
|
||||||
if not env['osx64']:
|
|
||||||
wxconfig.ParseWXConfig(env)
|
|
||||||
compileFlags += ['-DUSE_WX',]
|
|
||||||
|
|
||||||
#osx 64bit need this
|
|
||||||
if env['osx64']:
|
if env['osx64']:
|
||||||
|
# SDL and WX are broken on osx 64
|
||||||
|
env['HAVE_SDL'] = 0
|
||||||
|
env['HAVE_WX'] = 0;
|
||||||
compileFlags += ['-arch' , 'x86_64', '-DOSX64']
|
compileFlags += ['-arch' , 'x86_64', '-DOSX64']
|
||||||
|
|
||||||
|
# Gui less build
|
||||||
|
if env['nowx']:
|
||||||
|
env['HAVE_WX'] = 0;
|
||||||
|
|
||||||
|
# Creating config.h defines
|
||||||
|
conf.Define('HAVE_SDL', env['HAVE_SDL'])
|
||||||
|
conf.Define('HAVE_BLUEZ', env['HAVE_BLUEZ'])
|
||||||
|
conf.Define('HAVE_AO', env['HAVE_AO'])
|
||||||
|
conf.Define('HAVE_WX', env['HAVE_WX'])
|
||||||
|
|
||||||
|
# After all configuration tests are done
|
||||||
|
conf.Finish()
|
||||||
|
|
||||||
|
#wx windows flags
|
||||||
|
if env['HAVE_WX']:
|
||||||
|
wxconfig.ParseWXConfig(env)
|
||||||
|
compileFlags += ['-DUSE_WX']
|
||||||
|
|
||||||
#get sdl stuff
|
#get sdl stuff
|
||||||
if not env['osx64']:
|
if env['HAVE_SDL']:
|
||||||
env.ParseConfig('sdl-config --cflags --libs')
|
env.ParseConfig('sdl-config --cflags --libs')
|
||||||
|
|
||||||
# lib ao (needed for sound plugins)
|
# lib ao (needed for sound plugins)
|
||||||
if not env['osx64']:
|
if env['HAVE_AO']:
|
||||||
env.ParseConfig('pkg-config --cflags --libs ao')
|
env.ParseConfig('pkg-config --cflags --libs ao')
|
||||||
|
|
||||||
# bluetooth for wii
|
# bluetooth for wii
|
||||||
env.ParseConfig('pkg-config --cflags --libs bluez')
|
if env['HAVE_BLUEZ']:
|
||||||
|
env.ParseConfig('pkg-config --cflags --libs bluez')
|
||||||
|
|
||||||
# add methods from utils to env
|
# add methods from utils to env
|
||||||
env.AddMethod(utils.filterWarnings)
|
env.AddMethod(utils.filterWarnings)
|
||||||
@ -243,9 +247,10 @@ env['libs_dir'] = env['prefix'] + 'Libs/'
|
|||||||
#TODO where should this go?
|
#TODO where should this go?
|
||||||
env['data_dir'] = env['prefix']
|
env['data_dir'] = env['prefix']
|
||||||
|
|
||||||
env['LINKFLAGS'] = [ '-Wl,-rpath,' + env['libs_dir'] ]
|
env['RPATH'] = env['libs_dir']
|
||||||
|
|
||||||
env['LIBPATH'] += [ env['libs_dir'] ]
|
env['LIBPATH'] += [ env['libs_dir'] ]
|
||||||
Export('env')
|
|
||||||
|
|
||||||
rev = utils.GenerateRevFile(env['flavor'],
|
rev = utils.GenerateRevFile(env['flavor'],
|
||||||
"Source/Core/Common/Src/svnrev_template.h",
|
"Source/Core/Common/Src/svnrev_template.h",
|
||||||
@ -262,6 +267,8 @@ if unknown:
|
|||||||
# generate help
|
# generate help
|
||||||
Help(vars.GenerateHelpText(env))
|
Help(vars.GenerateHelpText(env))
|
||||||
|
|
||||||
|
Export('env')
|
||||||
|
|
||||||
for subdir in dirs:
|
for subdir in dirs:
|
||||||
SConscript(
|
SConscript(
|
||||||
subdir + os.sep + 'SConscript',
|
subdir + os.sep + 'SConscript',
|
||||||
|
@ -19,7 +19,7 @@ def CheckPKG(context, name):
|
|||||||
context.Message( 'Checking for %s... ' % name )
|
context.Message( 'Checking for %s... ' % name )
|
||||||
ret = context.TryAction('pkg-config --exists \'%s\'' % name)[0]
|
ret = context.TryAction('pkg-config --exists \'%s\'' % name)[0]
|
||||||
context.Result( ret )
|
context.Result( ret )
|
||||||
return ret
|
return int(ret)
|
||||||
|
|
||||||
|
|
||||||
def CheckSDL(context, version):
|
def CheckSDL(context, version):
|
||||||
@ -34,7 +34,7 @@ def CheckSDL(context, version):
|
|||||||
ret = (found >= required)
|
ret = (found >= required)
|
||||||
|
|
||||||
context.Result( ret )
|
context.Result( ret )
|
||||||
return ret
|
return int(ret)
|
||||||
|
|
||||||
def GenerateRevFile(flavour, template, output):
|
def GenerateRevFile(flavour, template, output):
|
||||||
|
|
||||||
|
@ -35,8 +35,10 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../../../PluginSpecs/CommonTypes.h"
|
#include "../../../PluginSpecs/CommonTypes.h"
|
||||||
|
#define HAVE_WIIUSE 1
|
||||||
#else
|
#else
|
||||||
#include "CommonTypes.h"
|
#include "CommonTypes.h"
|
||||||
|
#include "Config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
Import('env')
|
Import('env')
|
||||||
|
|
||||||
|
if not env['HAVE_WX']:
|
||||||
|
Return()
|
||||||
|
|
||||||
files = ["LogWindow.cpp",
|
files = ["LogWindow.cpp",
|
||||||
"BreakPointDlg.cpp",
|
"BreakPointDlg.cpp",
|
||||||
"BreakpointView.cpp",
|
"BreakpointView.cpp",
|
||||||
|
@ -3,13 +3,19 @@
|
|||||||
Import('env')
|
Import('env')
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
wxenv = env.Clone()
|
||||||
|
|
||||||
files = [
|
files = [
|
||||||
'BootManager.cpp',
|
'BootManager.cpp',
|
||||||
'Config.cpp',
|
'Config.cpp',
|
||||||
'cmdline.c',
|
'cmdline.c',
|
||||||
]
|
]
|
||||||
|
|
||||||
if not env['osx64']:
|
libs = [
|
||||||
|
'core', 'minilzo', 'discio', 'bdisasm', 'videocommon', 'common', 'z'
|
||||||
|
]
|
||||||
|
|
||||||
|
if wxenv['HAVE_WX']:
|
||||||
files += [
|
files += [
|
||||||
'AboutDolphin.cpp',
|
'AboutDolphin.cpp',
|
||||||
'ConfigMain.cpp',
|
'ConfigMain.cpp',
|
||||||
@ -26,36 +32,21 @@ if not env['osx64']:
|
|||||||
'stdafx.cpp',
|
'stdafx.cpp',
|
||||||
]
|
]
|
||||||
|
|
||||||
libs = [
|
CPPDEFINES = [
|
||||||
'core', 'minilzo', 'discio', 'bdisasm', 'videocommon', 'common', 'z'
|
'USE_XPM_BITMAPS',
|
||||||
]
|
'wxNEEDS_CHARPP',
|
||||||
|
],
|
||||||
|
|
||||||
wxenv = env.Clone()
|
|
||||||
if not wxenv['osx64']:
|
|
||||||
libs = [ 'debwx' ] + libs
|
libs = [ 'debwx' ] + libs
|
||||||
wxenv.Append(
|
|
||||||
CPPDEFINES = [
|
|
||||||
'USE_XPM_BITMAPS',
|
|
||||||
'wxNEEDS_CHARPP',
|
wxenv.Append(
|
||||||
],
|
LINKFLAGS = [
|
||||||
LINKFLAGS = [
|
'-pthread',
|
||||||
'-pthread',
|
],
|
||||||
],
|
LIBS = libs
|
||||||
LIBS = libs
|
)
|
||||||
)
|
|
||||||
else:
|
|
||||||
wxenv.Append(
|
|
||||||
CPPDEFINES = [
|
|
||||||
'USE_XPM_BITMAPS',
|
|
||||||
'wxNEEDS_CHARPP',
|
|
||||||
],
|
|
||||||
LINKFLAGS = [
|
|
||||||
'-pthread',
|
|
||||||
'-arch',
|
|
||||||
'x86_64'
|
|
||||||
],
|
|
||||||
LIBS = libs
|
|
||||||
)
|
|
||||||
|
|
||||||
if sys.platform == 'darwin':
|
if sys.platform == 'darwin':
|
||||||
exeGUI = env['binary_dir'] + 'Dolphin.app/Contents/MacOS/Dolphin'
|
exeGUI = env['binary_dir'] + 'Dolphin.app/Contents/MacOS/Dolphin'
|
||||||
@ -85,7 +76,8 @@ else:
|
|||||||
exeGUI = env['binary_dir'] + 'Dolphin'
|
exeGUI = env['binary_dir'] + 'Dolphin'
|
||||||
exeNoGUI = env['binary_dir'] + 'DolphinNoGUI'
|
exeNoGUI = env['binary_dir'] + 'DolphinNoGUI'
|
||||||
|
|
||||||
objects = [ wxenv.Object(srcFile) for srcFile in files ]
|
#objects = [ wxenv.Object(srcFile) for srcFile in files ]
|
||||||
if not wxenv['osx64']:
|
|
||||||
wxenv.Program(exeGUI, objects + [ 'Main.cpp' ])
|
if not wxenv['HAVE_WX']:
|
||||||
wxenv.Program(exeNoGUI, objects + [ 'MainNoGUI.cpp' ])
|
wxenv.Program(exeGUI, files + [ 'Main.cpp' ])
|
||||||
|
wxenv.Program(exeNoGUI, files + [ 'MainNoGUI.cpp' ])
|
||||||
|
@ -5,6 +5,10 @@ import sys
|
|||||||
|
|
||||||
name = "Plugin_DSP_HLE"
|
name = "Plugin_DSP_HLE"
|
||||||
|
|
||||||
|
if not env['HAVE_AO']:
|
||||||
|
print name + " must have AO to be build"
|
||||||
|
Return()
|
||||||
|
|
||||||
files = [
|
files = [
|
||||||
'DSPHandler.cpp',
|
'DSPHandler.cpp',
|
||||||
'MailHandler.cpp',
|
'MailHandler.cpp',
|
||||||
|
@ -5,6 +5,10 @@ import sys
|
|||||||
|
|
||||||
name = "Plugin_DSP_LLE"
|
name = "Plugin_DSP_LLE"
|
||||||
|
|
||||||
|
if not env['HAVE_AO']:
|
||||||
|
print name + " must have AO to be build"
|
||||||
|
Return()
|
||||||
|
|
||||||
files = [
|
files = [
|
||||||
"AOSoundStream.cpp",
|
"AOSoundStream.cpp",
|
||||||
# "DisAsmDlg.cpp",
|
# "DisAsmDlg.cpp",
|
||||||
|
@ -46,12 +46,12 @@ libs = [
|
|||||||
|
|
||||||
gfxenv = env.Clone()
|
gfxenv = env.Clone()
|
||||||
|
|
||||||
if not gfxenv['osx64']:
|
if gfxenv['HAVE_WX']:
|
||||||
files += [
|
files += [
|
||||||
'GUI/ConfigDlg.cpp',
|
'GUI/ConfigDlg.cpp',
|
||||||
'Debugger/Debugger.cpp',
|
'Debugger/Debugger.cpp',
|
||||||
'Debugger/PBView.cpp',
|
'Debugger/PBView.cpp',
|
||||||
]
|
]
|
||||||
|
|
||||||
if gfxenv['osx64']:
|
if gfxenv['osx64']:
|
||||||
files += [ 'cocoaGL.m' ]
|
files += [ 'cocoaGL.m' ]
|
||||||
@ -66,13 +66,10 @@ if gfxenv['osx64']:
|
|||||||
'x86_64'
|
'x86_64'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
useSDL = gfxenv['HAVE_SDL']
|
||||||
|
|
||||||
if sys.platform == 'darwin':
|
if sys.platform == 'darwin':
|
||||||
# SDL is currently the only way to get video on Mac OS X.
|
|
||||||
if gfxenv['osx64']:
|
|
||||||
useSDL = False
|
|
||||||
else:
|
|
||||||
useSDL = True
|
|
||||||
# TODO: clean it up (use incpath and libpath)
|
|
||||||
# Use libraries from MacPorts.
|
# Use libraries from MacPorts.
|
||||||
compileFlags.append('-I/opt/local/include')
|
compileFlags.append('-I/opt/local/include')
|
||||||
linkFlags.append('-L/opt/local/lib')
|
linkFlags.append('-L/opt/local/lib')
|
||||||
@ -83,6 +80,8 @@ if sys.platform == 'darwin':
|
|||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
# By default, GLX is used on Linux to setup OpenGL, but you can select SDL
|
# By default, GLX is used on Linux to setup OpenGL, but you can select SDL
|
||||||
|
# TODO: build both sdl and non X
|
||||||
|
useSDL = False
|
||||||
# instead if you like, by changing the line below.
|
# instead if you like, by changing the line below.
|
||||||
tests = {'CheckPKG' : utils.CheckPKG}
|
tests = {'CheckPKG' : utils.CheckPKG}
|
||||||
|
|
||||||
@ -96,7 +95,7 @@ else:
|
|||||||
|
|
||||||
gfxenv = conf.Finish()
|
gfxenv = conf.Finish()
|
||||||
|
|
||||||
useSDL = False
|
|
||||||
gfxenv.ParseConfig("pkg-config x11 --cflags --libs")
|
gfxenv.ParseConfig("pkg-config x11 --cflags --libs")
|
||||||
gfxenv.ParseConfig("pkg-config xxf86vm --cflags --libs")
|
gfxenv.ParseConfig("pkg-config xxf86vm --cflags --libs")
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
Import('env')
|
Import('env')
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
wmenv = env.Clone()
|
||||||
name = "Plugin_Wiimote"
|
name = "Plugin_Wiimote"
|
||||||
|
|
||||||
files = [
|
files = [
|
||||||
@ -16,21 +17,20 @@ files = [
|
|||||||
"Encryption.cpp",
|
"Encryption.cpp",
|
||||||
"FillReport.cpp",
|
"FillReport.cpp",
|
||||||
"main.cpp",
|
"main.cpp",
|
||||||
"wiimote_real.cpp",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
wiimoteenv = env.Clone()
|
libs = [ 'common' ]
|
||||||
|
|
||||||
if wiimoteenv['osx64']:
|
cxxflags = [ '-fPIC' ]
|
||||||
wiimoteenv.Append(
|
|
||||||
CXXFLAGS = [ '-arch', 'x86_64' ],
|
|
||||||
LINKFLAGS = [ '-arch', 'x86_64' ],
|
|
||||||
LIBS = [ 'common' ],
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
wiimoteenv.Append(
|
|
||||||
CXXFLAGS = [ '-fPIC' ],
|
|
||||||
LIBS = [ 'common', 'wiiuse' ],
|
|
||||||
)
|
|
||||||
|
|
||||||
wiimoteenv.SharedLibrary(env['plugin_dir']+name, files)
|
if wmenv['HAVE_WIIUSE']:
|
||||||
|
libs += [ 'wiiuse' ]
|
||||||
|
files += [ "wiimote_real.cpp" ]
|
||||||
|
cxxflags += ['-DHAVE_WIIUSE']
|
||||||
|
|
||||||
|
wmenv.Append(
|
||||||
|
CXXFLAGS = cxxflags,
|
||||||
|
LIBS = libs,
|
||||||
|
)
|
||||||
|
|
||||||
|
wmenv.SharedLibrary(env['plugin_dir']+name, files)
|
||||||
|
@ -28,7 +28,10 @@
|
|||||||
#include "pluginspecs_wiimote.h"
|
#include "pluginspecs_wiimote.h"
|
||||||
|
|
||||||
#include "EmuMain.h"
|
#include "EmuMain.h"
|
||||||
|
|
||||||
|
#if HAVE_WIIUSE
|
||||||
#include "wiimote_real.h"
|
#include "wiimote_real.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "Console.h" // for startConsoleWin, wprintf, GetConsoleHwnd
|
#include "Console.h" // for startConsoleWin, wprintf, GetConsoleHwnd
|
||||||
|
|
||||||
@ -128,8 +131,9 @@ extern "C" void Wiimote_Initialize(SWiimoteInitialize _WiimoteInitialize)
|
|||||||
/* We will run WiiMoteReal::Initialize() even if we are not using a real wiimote,
|
/* We will run WiiMoteReal::Initialize() even if we are not using a real wiimote,
|
||||||
we will initiate wiiuse.dll, but we will return before creating a new thread
|
we will initiate wiiuse.dll, but we will return before creating a new thread
|
||||||
for it in that case */
|
for it in that case */
|
||||||
|
#if HAVE_WIIUSE
|
||||||
g_UseRealWiiMote = WiiMoteReal::Initialize() > 0;
|
g_UseRealWiiMote = WiiMoteReal::Initialize() > 0;
|
||||||
|
#endif
|
||||||
g_Config.Load(); // load config settings
|
g_Config.Load(); // load config settings
|
||||||
|
|
||||||
WiiMoteEmu::Initialize();
|
WiiMoteEmu::Initialize();
|
||||||
@ -146,13 +150,17 @@ extern "C" void Wiimote_Initialize(SWiimoteInitialize _WiimoteInitialize)
|
|||||||
|
|
||||||
extern "C" void Wiimote_DoState(void* ptr, int mode)
|
extern "C" void Wiimote_DoState(void* ptr, int mode)
|
||||||
{
|
{
|
||||||
|
#if HAVE_WIIUSE
|
||||||
WiiMoteReal::DoState(ptr, mode);
|
WiiMoteReal::DoState(ptr, mode);
|
||||||
|
#endif
|
||||||
WiiMoteEmu::DoState(ptr, mode);
|
WiiMoteEmu::DoState(ptr, mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void Wiimote_Shutdown(void)
|
extern "C" void Wiimote_Shutdown(void)
|
||||||
{
|
{
|
||||||
|
#if HAVE_WIIUSE
|
||||||
WiiMoteReal::Shutdown();
|
WiiMoteReal::Shutdown();
|
||||||
|
#endif
|
||||||
WiiMoteEmu::Shutdown();
|
WiiMoteEmu::Shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -173,10 +181,13 @@ extern "C" void Wiimote_InterruptChannel(u16 _channelID, const void* _pData, u32
|
|||||||
LOGV(WII_IPC_WIIMOTE, 3, " Data: %s", Temp.c_str());
|
LOGV(WII_IPC_WIIMOTE, 3, " Data: %s", Temp.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_UseRealWiiMote)
|
if (! g_UseRealWiiMote)
|
||||||
WiiMoteReal::InterruptChannel(_channelID, _pData, _Size);
|
WiiMoteEmu::InterruptChannel(_channelID, _pData, _Size);
|
||||||
|
#if HAVE_WIIUSE
|
||||||
else
|
else
|
||||||
WiiMoteEmu::InterruptChannel(_channelID, _pData, _Size);
|
WiiMoteReal::InterruptChannel(_channelID, _pData, _Size);
|
||||||
|
#endif
|
||||||
|
|
||||||
LOGV(WII_IPC_WIIMOTE, 3, "=============================================================");
|
LOGV(WII_IPC_WIIMOTE, 3, "=============================================================");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -192,19 +203,25 @@ extern "C" void Wiimote_ControlChannel(u16 _channelID, const void* _pData, u32 _
|
|||||||
LOGV(WII_IPC_WIIMOTE, 3, " Data: %s", Temp.c_str());
|
LOGV(WII_IPC_WIIMOTE, 3, " Data: %s", Temp.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_UseRealWiiMote)
|
|
||||||
WiiMoteReal::ControlChannel(_channelID, _pData, _Size);
|
if (! g_UseRealWiiMote)
|
||||||
else
|
WiiMoteEmu::ControlChannel(_channelID, _pData, _Size);
|
||||||
WiiMoteEmu::ControlChannel(_channelID, _pData, _Size);
|
#if HAVE_WIIUSE
|
||||||
|
else
|
||||||
|
WiiMoteReal::ControlChannel(_channelID, _pData, _Size);
|
||||||
|
#endif
|
||||||
|
|
||||||
LOGV(WII_IPC_WIIMOTE, 3, "=============================================================");
|
LOGV(WII_IPC_WIIMOTE, 3, "=============================================================");
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void Wiimote_Update()
|
extern "C" void Wiimote_Update()
|
||||||
{
|
{
|
||||||
if (g_UseRealWiiMote)
|
if (! g_UseRealWiiMote)
|
||||||
WiiMoteReal::Update();
|
WiiMoteEmu::Update();
|
||||||
else
|
#if HAVE_WIIUSE
|
||||||
WiiMoteEmu::Update();
|
else
|
||||||
|
WiiMoteReal::Update();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" unsigned int Wiimote_GetAttachedControllers()
|
extern "C" unsigned int Wiimote_GetAttachedControllers()
|
||||||
|
@ -5,6 +5,10 @@ import sys
|
|||||||
|
|
||||||
name = "Plugin_nJoy_SDL"
|
name = "Plugin_nJoy_SDL"
|
||||||
|
|
||||||
|
if not env['HAVE_SDL']:
|
||||||
|
print name + " must have SDL to be build"
|
||||||
|
Return()
|
||||||
|
|
||||||
files = [
|
files = [
|
||||||
'nJoy.cpp',
|
'nJoy.cpp',
|
||||||
'GUI/AboutBox.cpp',
|
'GUI/AboutBox.cpp',
|
||||||
@ -16,5 +20,5 @@ padenv.Append(
|
|||||||
CXXFLAGS = [ '-fPIC' ],
|
CXXFLAGS = [ '-fPIC' ],
|
||||||
LIBS = [ 'common' ],
|
LIBS = [ 'common' ],
|
||||||
)
|
)
|
||||||
if not env['osx64']:
|
|
||||||
padenv.SharedLibrary(env['plugin_dir']+name, files)
|
padenv.SharedLibrary(env['plugin_dir']+name, files)
|
||||||
|
@ -5,6 +5,10 @@ import sys
|
|||||||
|
|
||||||
name = "Plugin_nJoy_Testing"
|
name = "Plugin_nJoy_Testing"
|
||||||
|
|
||||||
|
if not env['HAVE_SDL']:
|
||||||
|
print name + " must have SDL to be build"
|
||||||
|
Return()
|
||||||
|
|
||||||
files = [
|
files = [
|
||||||
'nJoy.cpp',
|
'nJoy.cpp',
|
||||||
'GUI/AboutBox.cpp',
|
'GUI/AboutBox.cpp',
|
||||||
|
Reference in New Issue
Block a user