From 739c9eb2dfb10501c91ce2d621ef85faba7e2674 Mon Sep 17 00:00:00 2001 From: Soren Jorvang Date: Tue, 12 Oct 2010 23:39:16 +0000 Subject: [PATCH] Allow building without bluetooth support. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6273 8ced0084-cf51-0410-be5f-012b33b47a6e --- Externals/WiiUse/Src/SConscript | 12 +++------ Externals/WiiUse/Src/io_dummy.c | 27 +++++++++++++++++++ Source/Core/Common/Src/Common.h | 6 ----- Source/Core/Core/Src/SConscript | 4 +-- Source/Core/DolphinWX/Src/SConscript | 7 +++-- .../Plugins/Plugin_VideoMerge/Src/SConscript | 2 +- 6 files changed, 35 insertions(+), 23 deletions(-) create mode 100644 Externals/WiiUse/Src/io_dummy.c diff --git a/Externals/WiiUse/Src/SConscript b/Externals/WiiUse/Src/SConscript index e5693d0fc9..0bdcaf3924 100644 --- a/Externals/WiiUse/Src/SConscript +++ b/Externals/WiiUse/Src/SConscript @@ -3,14 +3,6 @@ Import('env') import sys -env['HAVE_WIIUSE'] = 0 - -if not sys.platform == 'darwin' and not sys.platform == 'win32' and \ - not (sys.platform == 'linux2' and env['HAVE_BLUEZ']): - Return() - -env['HAVE_WIIUSE'] = 1 - files = [ "ir.c", "wiiuse.c", @@ -18,10 +10,12 @@ files = [ if sys.platform == 'darwin': files += [ "io_osx.m" ] -elif sys.platform == 'linux2': +elif sys.platform == 'linux2' and env['HAVE_BLUEZ']: files += [ "io_nix.c" ] elif sys.platform == 'win32': files += [ "io_win.c" ] +else: + files += [ "io_dummy.c" ] env.StaticLibrary(env['local_libs'] + "wiiuse", files) env['CPPPATH'] += ['#Externals/WiiUse/Src'] diff --git a/Externals/WiiUse/Src/io_dummy.c b/Externals/WiiUse/Src/io_dummy.c new file mode 100644 index 0000000000..f865a42fe4 --- /dev/null +++ b/Externals/WiiUse/Src/io_dummy.c @@ -0,0 +1,27 @@ +#include "definitions.h" +#include "wiiuse_internal.h" + +int wiiuse_find(struct wiimote_t **wm, int max_wiimotes, int timeout) +{ + return 0; +} + +int wiiuse_connect(struct wiimote_t **wm, int wiimotes) +{ + return 0; +} + +void wiiuse_disconnect(struct wiimote_t *wm) +{ + return; +} + +int wiiuse_io_read(struct wiimote_t *wm) +{ + return 0; +} + +int wiiuse_io_write(struct wiimote_t *wm, byte *buf, int len) +{ + return 0; +} diff --git a/Source/Core/Common/Src/Common.h b/Source/Core/Common/Src/Common.h index 54d3e1c950..7b1a9f626d 100644 --- a/Source/Core/Common/Src/Common.h +++ b/Source/Core/Common/Src/Common.h @@ -56,7 +56,6 @@ extern const char *netplay_dolphin_ver; #undef STACKALIGN #define STACKALIGN __attribute__((__force_align_arg_pointer__)) #endif -#define HAVE_WIIUSE 1 // We use wxWidgets on OS X only if it is version 2.9+ with Cocoa support. #ifdef __WXOSX_COCOA__ #define HAVE_WX 1 @@ -83,7 +82,6 @@ extern const char *netplay_dolphin_ver; #define GC_ALIGNED64_DECL(x) __declspec(align(64)) x // Since they are always around on windows - #define HAVE_WIIUSE 1 #define HAVE_WX 1 #define HAVE_OPENAL 1 @@ -114,10 +112,6 @@ extern const char *netplay_dolphin_ver; #include "config.h" // SCons autoconfiguration defines #endif -#if defined __linux__ && HAVE_BLUEZ -#define HAVE_WIIUSE 1 -#endif - // Windows compatibility #ifndef _WIN32 #include diff --git a/Source/Core/Core/Src/SConscript b/Source/Core/Core/Src/SConscript index f1916f126a..7d6f27f08f 100644 --- a/Source/Core/Core/Src/SConscript +++ b/Source/Core/Core/Src/SConscript @@ -60,6 +60,7 @@ files = [ "HW/WiimoteEmu/EmuSubroutines.cpp", "HW/WiimoteEmu/Encryption.cpp", #"HW/WiimoteEmu/Speaker.cpp", + "HW/WiimoteReal/WiimoteReal.cpp", "HW/GCPadEmu.cpp", "HW/HW.cpp", "HW/Memmap.cpp", @@ -150,7 +151,4 @@ elif sys.platform == 'darwin': else: files += [ "HW/BBA-TAP/TAP_Unix.cpp" ] -if env['HAVE_WIIUSE']: - files += [ 'HW/WiimoteReal/WiimoteReal.cpp' ] - env.StaticLibrary(env['local_libs'] + 'core', files, LIBS = libs) diff --git a/Source/Core/DolphinWX/Src/SConscript b/Source/Core/DolphinWX/Src/SConscript index 11af1214b8..50c50c83f1 100644 --- a/Source/Core/DolphinWX/Src/SConscript +++ b/Source/Core/DolphinWX/Src/SConscript @@ -11,7 +11,7 @@ files = [ libs = [ 'core', 'lzo2', 'discio', 'bdisasm', - 'inputcommon', 'common', 'lua', 'z', 'sfml-network', + 'inputcommon', 'common', 'lua', 'z', 'sfml-network', 'wiiuse', ] if env['HAVE_WX']: @@ -99,14 +99,13 @@ elif sys.platform == 'darwin' and env['HAVE_WX']: env.Depends(exeGUIdist, env['plugin_dir']) env.Fixup(exeGUIdist, exeGUI) else: + files += [ 'X11Utils.cpp' ] + libs += [ 'SDL' ] exeGUI = env['binary_dir'] + '/dolphin-emu' exeNoGUI = env['binary_dir'] + '/dolphin-emu-nogui' env.InstallAs(env['data_dir'] + '/sys', '#Data/Sys') env.InstallAs(env['data_dir'] + '/user', '#Data/User') -if env['HAVE_WIIUSE']: - libs += [ 'wiiuse' ] - if env['HAVE_WX']: env.StaticLibrary(env['local_libs'] + 'memcard', memcardfiles) env.Program(exeGUI, files, LIBS = wxlibs + libs + env['LIBS']) diff --git a/Source/Plugins/Plugin_VideoMerge/Src/SConscript b/Source/Plugins/Plugin_VideoMerge/Src/SConscript index 7ac9130d18..0e2f0eb782 100644 --- a/Source/Plugins/Plugin_VideoMerge/Src/SConscript +++ b/Source/Plugins/Plugin_VideoMerge/Src/SConscript @@ -8,7 +8,6 @@ name = os.sep + "Plugin_VideoMerge" files = [ 'BPFunctions.cpp', - 'EmuWindow.cpp', 'FramebufferManager.cpp', 'Main.cpp', 'PixelShaderCache.cpp', @@ -32,6 +31,7 @@ files = [ ] if sys.platform == 'win32': files += [ + 'EmuWindow.cpp', 'DX11/DX11_D3DBase.cpp', 'DX11/DX11_D3DBlob.cpp', 'DX11/DX11_D3DShader.cpp',