From 697480f5cc747c8777c6c3f97de032f6586fbd2c Mon Sep 17 00:00:00 2001 From: Soren Jorvang Date: Fri, 16 Jul 2010 19:17:35 +0000 Subject: [PATCH] Remove long-rotted vestiges of SDL video output. Use SDL for input devices only on Windows and Linux. (Still globally enabled for the legacy Wiimote plugin.) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5886 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DolphinWX/Src/MainNoGUI.cpp | 4 ---- Source/Core/DolphinWX/Src/SConscript | 1 - .../Src/ControllerInterface/ControllerInterface.h | 11 ++++++----- Source/Core/InputCommon/Src/SConscript | 11 ++++++++--- Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h | 4 ---- Source/Plugins/Plugin_VideoOGL/Src/SConscript | 2 +- Source/Plugins/Plugin_VideoSoftware/Src/GLUtil.h | 3 --- Source/Plugins/Plugin_VideoSoftware/Src/SConscript | 2 +- Source/Plugins/Plugin_WiimoteNew/Src/SConscript | 9 ++++++--- 9 files changed, 22 insertions(+), 25 deletions(-) diff --git a/Source/Core/DolphinWX/Src/MainNoGUI.cpp b/Source/Core/DolphinWX/Src/MainNoGUI.cpp index 7ed9b69d81..8636c8a8be 100644 --- a/Source/Core/DolphinWX/Src/MainNoGUI.cpp +++ b/Source/Core/DolphinWX/Src/MainNoGUI.cpp @@ -356,10 +356,6 @@ int main(int argc, char *argv[]) int appleMain(int argc, char *argv[]) #else -// Include SDL header so it can hijack main(). -#if defined(USE_SDL) && USE_SDL -#include -#endif int main(int argc, char* argv[]) #endif { diff --git a/Source/Core/DolphinWX/Src/SConscript b/Source/Core/DolphinWX/Src/SConscript index a5d44c8a55..3c03bbe6e0 100644 --- a/Source/Core/DolphinWX/Src/SConscript +++ b/Source/Core/DolphinWX/Src/SConscript @@ -13,7 +13,6 @@ files = [ libs = [ 'core', 'lzo2', 'discio', 'bdisasm', 'videocommon', 'inputcommon', 'common', 'lua', 'z', 'sfml-network', - 'SDL' ] if wxenv['HAVE_WX']: diff --git a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.h b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.h index db015cd72b..903797a6e4 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.h +++ b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.h @@ -14,15 +14,16 @@ #define CIFACE_USE_DINPUT_JOYSTICK #define CIFACE_USE_DINPUT_KBM #define CIFACE_USE_DINPUT -#endif -#if defined(HAVE_X11) && HAVE_X11 - #define CIFACE_USE_XLIB -#endif -//#ifndef CIFACE_USE_DIRECTINPUT_JOYSTICK +//#ifndef CIFACE_USE_DINPUT_JOYSTICK // enable SDL 1.2 in addition to DirectInput on windows, // to support a few gamepads that aren't behaving with DInput #define CIFACE_USE_SDL //#endif +#endif +#if defined(HAVE_X11) && HAVE_X11 + #define CIFACE_USE_XLIB + #define CIFACE_USE_SDL +#endif #if defined(__APPLE__) #define CIFACE_USE_OSX #endif diff --git a/Source/Core/InputCommon/Src/SConscript b/Source/Core/InputCommon/Src/SConscript index 1759516d5f..6b189be449 100644 --- a/Source/Core/InputCommon/Src/SConscript +++ b/Source/Core/InputCommon/Src/SConscript @@ -6,9 +6,7 @@ files = [ 'Configuration.cpp', 'ControllerEmu.cpp', 'InputConfig.cpp', - 'SDL_Util.cpp', 'ControllerInterface/ControllerInterface.cpp', - 'ControllerInterface/SDL/SDL.cpp', 'UDPWiimote.cpp', 'UDPWrapper.cpp' ] @@ -24,7 +22,8 @@ elif sys.platform == 'darwin': files += [ 'ControllerInterface/OSX/OSX.mm', 'ControllerInterface/OSX/OSXKeyboard.mm', - 'ControllerInterface/OSX/OSXMouse.mm' + 'ControllerInterface/OSX/OSXMouse.mm', + 'SDL_Util.cpp', # XXX needed by old Wiimote plugin ] else: files += [ @@ -32,4 +31,10 @@ else: 'X11InputBase.cpp' ] +if sys.platform == 'win32' or sys.platform == 'linux2': + files += [ + 'ControllerInterface/SDL/SDL.cpp', + 'SDL_Util.cpp', + ] + env.StaticLibrary(env['local_libs'] + "inputcommon", files) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h index 36b23238cf..c5d1e3fc98 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h @@ -45,10 +45,6 @@ #include #include "Thread.h" -#elif defined(USE_SDL) && USE_SDL -#include -#include - #elif defined(__APPLE__) #include #include "cocoaGL.h" diff --git a/Source/Plugins/Plugin_VideoOGL/Src/SConscript b/Source/Plugins/Plugin_VideoOGL/Src/SConscript index ec2c87d4ab..ec5a6316b7 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/SConscript +++ b/Source/Plugins/Plugin_VideoOGL/Src/SConscript @@ -28,7 +28,7 @@ files = [ linkFlags = [ ] libs = [ - 'videocommon', 'GLEW', 'SDL', 'SOIL', 'common' + 'videocommon', 'GLEW', 'SOIL', 'common' ] gfxenv = env.Clone() diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/GLUtil.h b/Source/Plugins/Plugin_VideoSoftware/Src/GLUtil.h index a69307cafb..4cf5aae72a 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/GLUtil.h +++ b/Source/Plugins/Plugin_VideoSoftware/Src/GLUtil.h @@ -47,9 +47,6 @@ #define I_NEED_OS2_H // HAXXOR #include #include -#elif defined(USE_SDL) && USE_SDL -#include -#include #else #include #endif // end USE_WX diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/SConscript b/Source/Plugins/Plugin_VideoSoftware/Src/SConscript index 9143a22c3a..cceb2914d9 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/SConscript +++ b/Source/Plugins/Plugin_VideoSoftware/Src/SConscript @@ -39,7 +39,7 @@ files = [ linkFlags = [ ] libs = [ - 'videocommon', 'GLEW', 'SDL', 'SOIL', 'common' + 'videocommon', 'GLEW', 'SOIL', 'common' ] gfxenv = env.Clone() diff --git a/Source/Plugins/Plugin_WiimoteNew/Src/SConscript b/Source/Plugins/Plugin_WiimoteNew/Src/SConscript index ca982c6a59..cfa4465583 100644 --- a/Source/Plugins/Plugin_WiimoteNew/Src/SConscript +++ b/Source/Plugins/Plugin_WiimoteNew/Src/SConscript @@ -19,12 +19,15 @@ files = [ 'WiimoteNew.cpp' ] -libs = [ 'inputcommon', 'common', 'SDL' ] - cxxflags = [ ] +libs = [ 'inputcommon', 'common'] + +if sys.platform == 'win32' or sys.platform == 'linux2': + libs += [ 'SDL' ] + if wiinewenv['HAVE_WX']: - libs = [ 'inputuicommon' ] + libs + libs += [ 'inputuicommon' ] files += [ 'WiimoteConfigDiag.cpp' ] if wiinewenv['HAVE_WIIUSE']: