From 379c4693436c9a71e4f88e3428e37ef46a7534c2 Mon Sep 17 00:00:00 2001 From: nakeee Date: Tue, 13 Apr 2010 06:09:45 +0000 Subject: [PATCH] Linux compile fix for billard's changes. (Had to do it myself since glen is now a windows person :P) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5356 8ced0084-cf51-0410-be5f-012b33b47a6e --- SConstruct | 3 +++ .../ControllerInterface.cpp | 2 +- Source/Core/InputCommon/Src/SConscript | 20 +++++++++++--- Source/Core/InputPluginCommon/Src/SConscript | 15 +++++++++++ Source/Plugins/Plugin_GCPadNew/Src/SConscript | 21 ++------------- .../Plugins/Plugin_WiimoteNew/Src/SConscript | 26 +++++++++++++++++++ .../Src/WiimoteEmu/WiimoteEmu.cpp | 2 +- 7 files changed, 64 insertions(+), 25 deletions(-) create mode 100644 Source/Core/InputPluginCommon/Src/SConscript create mode 100644 Source/Plugins/Plugin_WiimoteNew/Src/SConscript diff --git a/SConstruct b/SConstruct index a1c86b97b0..8398b242a3 100644 --- a/SConstruct +++ b/SConstruct @@ -54,6 +54,7 @@ include_paths = [ basedir + 'Externals/WiiUseSrc/Src', basedir + 'Source/Core/VideoCommon/Src', basedir + 'Source/Core/InputCommon/Src', + basedir + 'Source/Core/InputPluginCommon/Src', basedir + 'Source/Core/AudioCommon/Src', basedir + 'Source/Core/DebuggerUICommon/Src', basedir + 'Source/Core/DSPCore/Src', @@ -82,6 +83,8 @@ dirs = [ 'Source/Core/DolphinWX/Src', 'Source/Core/DebuggerWX/Src', 'Source/UnitTests/', + 'Source/Core/InputPluginCommon/Src/', + 'Source/Plugins/Plugin_WiimoteNew/Src/', ] builders = {} diff --git a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp index 448e7ee0cc..d1b97c7e37 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp +++ b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp @@ -40,7 +40,7 @@ void ControllerInterface::Init() ciface::DirectInput::Init( m_devices/*, (HWND)m_hwnd*/ ); #endif #ifdef CIFACE_USE_XLIB - ciface::XLIB::Init( m_devices, m_hwnd ); + ciface::Xlib::Init( m_devices, m_hwnd ); #endif #ifdef CIFACE_USE_OSX ciface::OSX::Init( m_devices, m_hwnd ); diff --git a/Source/Core/InputCommon/Src/SConscript b/Source/Core/InputCommon/Src/SConscript index 6d1177c257..acb0b83013 100644 --- a/Source/Core/InputCommon/Src/SConscript +++ b/Source/Core/InputCommon/Src/SConscript @@ -1,12 +1,14 @@ # -*- python -*- - +import sys Import('env') +icenv = env.Clone() files = [ 'Configuration.cpp', 'EventHandler.cpp', 'InputCommon.cpp', 'SDL_Util.cpp', + 'ControllerInterface/ControllerInterface.cpp', ] if env['HAVE_X11']: @@ -19,6 +21,16 @@ if env['HAVE_WX']: "WXInputBase.cpp", ] -env_inputcommon = env.Clone() -env_inputcommon.Append(CXXFLAGS = [ '-fPIC' ]) -env_inputcommon.StaticLibrary(env['local_libs'] + "inputcommon", files) +if icenv['HAVE_SDL']: + files += [ 'ControllerInterface/SDL/SDL.cpp' ] +if sys.platform == 'darwin': + files += [ 'ControllerInterface/OSX/OSX.cpp', + 'ControllerInterface/OSX/OSXPrivate.mm' ] +if sys.platform == 'linux2': + files += [ 'ControllerInterface/Xlib/Xlib.cpp' ] + + +icenv.Append(CXXFLAGS = [ '-fPIC' ]) +icenv.StaticLibrary(env['local_libs'] + "inputcommon", files) + + diff --git a/Source/Core/InputPluginCommon/Src/SConscript b/Source/Core/InputPluginCommon/Src/SConscript new file mode 100644 index 0000000000..0aff7caf13 --- /dev/null +++ b/Source/Core/InputPluginCommon/Src/SConscript @@ -0,0 +1,15 @@ +# -*- python -*- + +Import('env') + +files = [ + 'Config.cpp', + 'ConfigDiagBitmaps.cpp', + 'ConfigDiag.cpp', + 'ControllerEmu.cpp', + 'IniFile.cpp', + ] + +env_inputpc = env.Clone() +env_inputpc.Append(CXXFLAGS = [ '-fPIC' ]) +env_inputpc.StaticLibrary(env['local_libs'] + "inputplugincommon", files) diff --git a/Source/Plugins/Plugin_GCPadNew/Src/SConscript b/Source/Plugins/Plugin_GCPadNew/Src/SConscript index e2dd3d50d2..ba5051d5b9 100644 --- a/Source/Plugins/Plugin_GCPadNew/Src/SConscript +++ b/Source/Plugins/Plugin_GCPadNew/Src/SConscript @@ -7,29 +7,12 @@ name = "Plugin_GCPadNew" padenv = env.Clone() files = [ - 'Config.cpp', - 'ControllerEmu.cpp', - 'ControllerEmu/GCPad/GCPad.cpp', 'GCPadNew.cpp', - 'ControllerInterface/ControllerInterface.cpp', - 'IniFile.cpp' + 'GCPadEmu.cpp', ] -if padenv['HAVE_SDL']: - files += [ 'ControllerInterface/SDL/SDL.cpp' ] -if sys.platform == 'darwin': - files += [ 'ControllerInterface/OSX/OSX.cpp', 'ControllerInterface/OSX/OSXPrivate.mm' ] -if sys.platform == 'linux2': - files += [ 'ControllerInterface/Xlib/Xlib.cpp' ] - -if padenv['HAVE_WX']: - files += [ - 'ConfigDiag.cpp', - 'ConfigDiagBitmaps.cpp', - ] - padenv.Append( - LIBS = [ 'inputcommon', 'common' ], + LIBS = [ 'inputplugincommon', 'inputcommon', 'common' ], ) if sys.platform == 'darwin': diff --git a/Source/Plugins/Plugin_WiimoteNew/Src/SConscript b/Source/Plugins/Plugin_WiimoteNew/Src/SConscript new file mode 100644 index 0000000000..31ac23de05 --- /dev/null +++ b/Source/Plugins/Plugin_WiimoteNew/Src/SConscript @@ -0,0 +1,26 @@ +# -*- python -*- + +Import('env') +import sys + +name = "Plugin_WiimoteNew" +wiinewenv = env.Clone() + +files = [ + 'WiimoteEmu/WiimoteEmu.cpp', + 'WiimoteEmu/Attachment/Classic.cpp', + 'WiimoteEmu/Attachment/Attachment.cpp', + 'WiimoteEmu/Attachment/Nunchuk.cpp', + 'WiimoteEmu/EmuSubroutines.cpp', + 'WiimoteEmu/Encryption.cpp', + 'WiimoteNew.cpp', + ] + +wiinewenv.Append( + LIBS = [ 'inputplugincommon', 'inputcommon', 'common' ], + ) + +if sys.platform == 'darwin': + wiinewenv['FRAMEWORKS'] = ['CoreFoundation', 'System', 'Cocoa' ] + +wiinewenv.SharedLibrary(env['plugin_dir']+name, files) diff --git a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/WiimoteEmu.cpp b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/WiimoteEmu.cpp index 049cb4bc58..6429c8f4d6 100644 --- a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/WiimoteEmu.cpp +++ b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/WiimoteEmu.cpp @@ -42,7 +42,7 @@ static const u8 eeprom_data_16D0[] = { }; // array of accel data to emulate shaking -static const u8 shake_data[8] = { 0x80, 0x40, 0x01, 0x40, 0x80, 0xC0, 0xFF, 0xC0 }; +const u8 shake_data[8] = { 0x80, 0x40, 0x01, 0x40, 0x80, 0xC0, 0xFF, 0xC0 }; const u16 button_bitmasks[] = {