From e7f7eff2b6c93fbe50b2bb389d9a3ad3bffdbf07 Mon Sep 17 00:00:00 2001 From: Soren Jorvang Date: Fri, 11 Jun 2010 08:51:46 +0000 Subject: [PATCH] Remove a few unused HAVE_FOO's and make the SDL check global. ulong is not a standard type. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5649 8ced0084-cf51-0410-be5f-012b33b47a6e --- SConstruct | 11 +++-------- Source/Core/Core/Src/MemTools.cpp | 2 +- Source/Core/InputCommon/Src/SConscript | 6 +----- Source/Plugins/Plugin_GCPad/Src/SConscript | 4 ---- Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp | 4 ++-- Source/Plugins/Plugin_VideoSoftware/Src/GLUtil.cpp | 4 ++-- 6 files changed, 9 insertions(+), 22 deletions(-) diff --git a/SConstruct b/SConstruct index c8a9f190ca..a1d84fc5c3 100644 --- a/SConstruct +++ b/SConstruct @@ -275,8 +275,7 @@ if sys.platform == 'darwin': conf.CheckMacports() conf.CheckFink() -env['HAVE_SDL'] = conf.CheckSDL('1.0.0') -if not env['HAVE_SDL']: +if not conf.CheckSDL('1.0.0'): print "SDL is required" Exit(1) @@ -405,16 +404,13 @@ if not sys.platform == 'win32' and not sys.platform == 'darwin': print "Must have CgGl to build" Exit(1) -env['HAVE_ZLIB'] = conf.CheckPKG('z') -if not ['HAVE_ZLIB']: +if not conf.CheckPKG('z'): print "zlib is required" Exit(1) # Check for GTK 2.0 or newer -env['HAVE_GTK2'] = 0 if sys.platform == 'linux2': - env['HAVE_GTK2'] = env['HAVE_WX'] and conf.CheckPKG('gtk+-2.0') - if env['HAVE_WX'] and not env['HAVE_GTK2']: + if env['HAVE_WX'] and not conf.CheckPKG('gtk+-2.0'): print "gtk+-2.0 developement headers not detected" print "gtk+-2.0 is required to build the WX GUI" Exit(1) @@ -426,7 +422,6 @@ if env['nojit']: conf.Define('NOJIT', env['NOJIT']) # 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_OPENCL', env['HAVE_OPENCL']) diff --git a/Source/Core/Core/Src/MemTools.cpp b/Source/Core/Core/Src/MemTools.cpp index 15fd994d85..9d2e1cde4b 100644 --- a/Source/Core/Core/Src/MemTools.cpp +++ b/Source/Core/Core/Src/MemTools.cpp @@ -26,7 +26,7 @@ #define CREG_RIP(ctx) (ctx)->gregs[REG_RIP] #define CREG_EAX(ctx) (ctx)->gregs[REG_EAX] #define CREG_EIP(ctx) (ctx)->gregs[REG_EIP] -#else +#elif defined(__APPLE__) #define CREG_RAX(ctx) (*(ctx))->__ss.__rax #define CREG_RIP(ctx) (*(ctx))->__ss.__rip #define CREG_EAX(ctx) (*(ctx))->__ss.__eax diff --git a/Source/Core/InputCommon/Src/SConscript b/Source/Core/InputCommon/Src/SConscript index d4b340316c..426d877aac 100644 --- a/Source/Core/InputCommon/Src/SConscript +++ b/Source/Core/InputCommon/Src/SConscript @@ -8,6 +8,7 @@ files = [ 'InputCommon.cpp', 'SDL_Util.cpp', 'ControllerInterface/ControllerInterface.cpp', + 'ControllerInterface/SDL/SDL.cpp' ] if env['HAVE_X11']: @@ -20,11 +21,6 @@ if env['HAVE_WX']: "WXInputBase.cpp", ] -if env['HAVE_SDL']: - files += [ - 'ControllerInterface/SDL/SDL.cpp' - ] - if sys.platform == 'darwin': files += [ 'ControllerInterface/OSX/OSX.mm', diff --git a/Source/Plugins/Plugin_GCPad/Src/SConscript b/Source/Plugins/Plugin_GCPad/Src/SConscript index d70919e919..1930af31be 100644 --- a/Source/Plugins/Plugin_GCPad/Src/SConscript +++ b/Source/Plugins/Plugin_GCPad/Src/SConscript @@ -6,10 +6,6 @@ import sys name = "Plugin_GCPad" padenv = env.Clone() -if not env['HAVE_SDL']: - print name + " must have SDL to be build" - Return() - files = [ 'Config.cpp', 'GCPad.cpp', diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp index 77a6fd2b54..8c31d7dd7a 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp @@ -224,9 +224,9 @@ THREAD_RETURN XEventThread(void *pArg) s_backbuffer_height = GLWin.height; break; case ClientMessage: - if ((ulong) event.xclient.data.l[0] == XInternAtom(GLWin.dpy, "WM_DELETE_WINDOW", False)) + if ((unsigned long) event.xclient.data.l[0] == XInternAtom(GLWin.dpy, "WM_DELETE_WINDOW", False)) g_VideoInitialize.pCoreMessage(WM_USER_STOP); - if ((ulong) event.xclient.data.l[0] == XInternAtom(GLWin.dpy, "RESIZE", False)) + if ((unsigned long) event.xclient.data.l[0] == XInternAtom(GLWin.dpy, "RESIZE", False)) XMoveResizeWindow(GLWin.dpy, GLWin.win, event.xclient.data.l[1], event.xclient.data.l[2], event.xclient.data.l[3], event.xclient.data.l[4]); break; diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/GLUtil.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/GLUtil.cpp index abbfaf1cb8..af3ee02465 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/GLUtil.cpp +++ b/Source/Plugins/Plugin_VideoSoftware/Src/GLUtil.cpp @@ -416,9 +416,9 @@ void OpenGL_Update() s_backbuffer_height = GLWin.height; break; case ClientMessage: - if ((ulong) event.xclient.data.l[0] == XInternAtom(GLWin.dpy, "WM_DELETE_WINDOW", False)) + if ((unsigned long) event.xclient.data.l[0] == XInternAtom(GLWin.dpy, "WM_DELETE_WINDOW", False)) g_VideoInitialize.pCoreMessage(WM_USER_STOP); - if ((ulong) event.xclient.data.l[0] == XInternAtom(GLWin.dpy, "RESIZE", False)) + if ((unsigned long) event.xclient.data.l[0] == XInternAtom(GLWin.dpy, "RESIZE", False)) XMoveResizeWindow(GLWin.dpy, GLWin.win, event.xclient.data.l[1], event.xclient.data.l[2], event.xclient.data.l[3], event.xclient.data.l[4]); return;