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
This commit is contained in:
Soren Jorvang 2010-06-11 08:51:46 +00:00
parent b7c2e523b3
commit e7f7eff2b6
6 changed files with 9 additions and 22 deletions

View File

@ -275,8 +275,7 @@ if sys.platform == 'darwin':
conf.CheckMacports() conf.CheckMacports()
conf.CheckFink() conf.CheckFink()
env['HAVE_SDL'] = conf.CheckSDL('1.0.0') if not conf.CheckSDL('1.0.0'):
if not env['HAVE_SDL']:
print "SDL is required" print "SDL is required"
Exit(1) Exit(1)
@ -405,16 +404,13 @@ if not sys.platform == 'win32' and not sys.platform == 'darwin':
print "Must have CgGl to build" print "Must have CgGl to build"
Exit(1) Exit(1)
env['HAVE_ZLIB'] = conf.CheckPKG('z') if not conf.CheckPKG('z'):
if not ['HAVE_ZLIB']:
print "zlib is required" print "zlib is required"
Exit(1) Exit(1)
# Check for GTK 2.0 or newer # Check for GTK 2.0 or newer
env['HAVE_GTK2'] = 0
if sys.platform == 'linux2': if sys.platform == 'linux2':
env['HAVE_GTK2'] = env['HAVE_WX'] and conf.CheckPKG('gtk+-2.0') if env['HAVE_WX'] and not conf.CheckPKG('gtk+-2.0'):
if env['HAVE_WX'] and not env['HAVE_GTK2']:
print "gtk+-2.0 developement headers not detected" print "gtk+-2.0 developement headers not detected"
print "gtk+-2.0 is required to build the WX GUI" print "gtk+-2.0 is required to build the WX GUI"
Exit(1) Exit(1)
@ -426,7 +422,6 @@ if env['nojit']:
conf.Define('NOJIT', env['NOJIT']) conf.Define('NOJIT', env['NOJIT'])
# Creating config.h defines # Creating config.h defines
conf.Define('HAVE_SDL', env['HAVE_SDL'])
conf.Define('HAVE_BLUEZ', env['HAVE_BLUEZ']) conf.Define('HAVE_BLUEZ', env['HAVE_BLUEZ'])
conf.Define('HAVE_AO', env['HAVE_AO']) conf.Define('HAVE_AO', env['HAVE_AO'])
conf.Define('HAVE_OPENCL', env['HAVE_OPENCL']) conf.Define('HAVE_OPENCL', env['HAVE_OPENCL'])

View File

@ -26,7 +26,7 @@
#define CREG_RIP(ctx) (ctx)->gregs[REG_RIP] #define CREG_RIP(ctx) (ctx)->gregs[REG_RIP]
#define CREG_EAX(ctx) (ctx)->gregs[REG_EAX] #define CREG_EAX(ctx) (ctx)->gregs[REG_EAX]
#define CREG_EIP(ctx) (ctx)->gregs[REG_EIP] #define CREG_EIP(ctx) (ctx)->gregs[REG_EIP]
#else #elif defined(__APPLE__)
#define CREG_RAX(ctx) (*(ctx))->__ss.__rax #define CREG_RAX(ctx) (*(ctx))->__ss.__rax
#define CREG_RIP(ctx) (*(ctx))->__ss.__rip #define CREG_RIP(ctx) (*(ctx))->__ss.__rip
#define CREG_EAX(ctx) (*(ctx))->__ss.__eax #define CREG_EAX(ctx) (*(ctx))->__ss.__eax

View File

@ -8,6 +8,7 @@ files = [
'InputCommon.cpp', 'InputCommon.cpp',
'SDL_Util.cpp', 'SDL_Util.cpp',
'ControllerInterface/ControllerInterface.cpp', 'ControllerInterface/ControllerInterface.cpp',
'ControllerInterface/SDL/SDL.cpp'
] ]
if env['HAVE_X11']: if env['HAVE_X11']:
@ -20,11 +21,6 @@ if env['HAVE_WX']:
"WXInputBase.cpp", "WXInputBase.cpp",
] ]
if env['HAVE_SDL']:
files += [
'ControllerInterface/SDL/SDL.cpp'
]
if sys.platform == 'darwin': if sys.platform == 'darwin':
files += [ files += [
'ControllerInterface/OSX/OSX.mm', 'ControllerInterface/OSX/OSX.mm',

View File

@ -6,10 +6,6 @@ import sys
name = "Plugin_GCPad" name = "Plugin_GCPad"
padenv = env.Clone() padenv = env.Clone()
if not env['HAVE_SDL']:
print name + " must have SDL to be build"
Return()
files = [ files = [
'Config.cpp', 'Config.cpp',
'GCPad.cpp', 'GCPad.cpp',

View File

@ -224,9 +224,9 @@ THREAD_RETURN XEventThread(void *pArg)
s_backbuffer_height = GLWin.height; s_backbuffer_height = GLWin.height;
break; break;
case ClientMessage: 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); 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], 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]); event.xclient.data.l[2], event.xclient.data.l[3], event.xclient.data.l[4]);
break; break;

View File

@ -416,9 +416,9 @@ void OpenGL_Update()
s_backbuffer_height = GLWin.height; s_backbuffer_height = GLWin.height;
break; break;
case ClientMessage: 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); 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], 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]); event.xclient.data.l[2], event.xclient.data.l[3], event.xclient.data.l[4]);
return; return;