From bf2bb00f63b8abd28b7ebea6ac377593c1d76486 Mon Sep 17 00:00:00 2001 From: Soren Jorvang Date: Thu, 20 Jan 2011 05:06:29 +0000 Subject: [PATCH] Disable the default PIC generation on OS X. This might make for a minor performance improvement and also possibly make that platform a little less prone to problems with ABI assumptions in the JIT code, although I haven't measured the first or seen signs of the latter. Only the GL context needs to be specifically freed when shutting down OpenGL. The GL canvas is implicitly freed by wxWindow. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6885 8ced0084-cf51-0410-be5f-012b33b47a6e --- SConstruct | 4 ++++ Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp | 2 +- Source/Plugins/Plugin_VideoSoftware/Src/GLUtil.cpp | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/SConstruct b/SConstruct index a8de696ca2..2f7b5e823c 100644 --- a/SConstruct +++ b/SConstruct @@ -123,6 +123,7 @@ if sys.platform == 'darwin': env['CCFLAGS'] += ccld env['CCFLAGS'] += ['-Xarch_i386', '-msse3', '-Xarch_x86_64', '-mssse3'] env['CCFLAGS'] += ['-mtune=core2', '-Xarch_x86_64', '-march=core2'] + env['CCFLAGS'] += ['-mdynamic-no-pic'] env['CCFLAGS'] += ['-iframework/Developer/SDKs/MacOSX10.5.sdk' + system] env['CCFLAGS'] += ['-iframework/Developer/SDKs/MacOSX10.6.sdk' + system] env['CC'] = "gcc-4.2 -ObjC" @@ -135,7 +136,9 @@ if sys.platform == 'darwin': env['LIBS'] = ['iconv'] env['LINKFLAGS'] += ccld env['LINKFLAGS'] += ['-Wl,-search_paths_first', '-Wl,-Z', '-F' + system] + env['SHCCFLAGS'] = env['CCFLAGS'] # Get rid of the -fPIC added in gcc.py env['SHLINKFLAGS'] += ['-Wl,-undefined,dynamic_lookup'] + env['SHLINKFLAGS'] += ['-Xarch_i386', '-Wl,-read_only_relocs,suppress'] if platform.mac_ver()[0] >= '10.6.0': env['CCFLAGS'] += ['-Wextra-tokens', '-Wnewline-eof'] @@ -163,6 +166,7 @@ if sys.platform == 'darwin': env['CPPPATH'] += ['#Externals'] env['FRAMEWORKPATH'] += ['Externals/Cg'] env['FRAMEWORKS'] += ['Cg'] + env['shared_sdl'] = True env['shared_zlib'] = True env['data_dir'] = '#' + env['prefix'] + '/Dolphin.app/Contents/Resources' diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp index afde606fc9..75c79772b1 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp @@ -572,7 +572,7 @@ void OpenGL_Update() void OpenGL_Shutdown() { #if defined(USE_WX) && USE_WX - delete GLWin.glCanvas; + delete GLWin.glCtxt; #elif defined(__APPLE__) [GLWin.cocoaWin close]; [GLWin.cocoaCtx clearDrawable]; diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/GLUtil.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/GLUtil.cpp index 7b49480400..d62ce2e630 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/GLUtil.cpp +++ b/Source/Plugins/Plugin_VideoSoftware/Src/GLUtil.cpp @@ -383,7 +383,7 @@ void OpenGL_Update() void OpenGL_Shutdown() { #if defined(USE_WX) && USE_WX - delete GLWin.glCanvas; + delete GLWin.glCtxt; #elif defined(_WIN32) if (hRC) // Do We Have A Rendering Context? {