diff --git a/SConstruct b/SConstruct
index a2d89cf33b..387eea179b 100644
--- a/SConstruct
+++ b/SConstruct
@@ -129,6 +129,7 @@ if sys.platform == 'darwin':
env['FRAMEWORKS'] += ['AudioToolbox', 'AudioUnit', 'CoreAudio', 'WebKit']
env['FRAMEWORKS'] += ['IOBluetooth', 'IOKit', 'OpenGL']
env['LINKFLAGS'] += ccld
+ env['LINKFLAGS'] += ['-Wl,-dead_strip']
env['LINKFLAGS'] += ['-Wl,-pagezero_size,0x1000']
env['LINKFLAGS'] += ['-Wl,-search_paths_first']
@@ -170,7 +171,7 @@ elif sys.platform == 'win32':
pass
else:
- env['CCFLAGS'] += ['-fPIC', '-msse2', '-pthread']
+ env['CCFLAGS'] += ['-msse2', '-pthread']
if env['CCVERSION'] >= '4.2.0':
env['CCFLAGS'] += ['-fvisibility=hidden']
env['CXXFLAGS'] += ['-fvisibility-inlines-hidden']
diff --git a/Source/Core/Common/CMakeLists.txt b/Source/Core/Common/CMakeLists.txt
index ea8b0dea58..ea0bc0b447 100644
--- a/Source/Core/Common/CMakeLists.txt
+++ b/Source/Core/Common/CMakeLists.txt
@@ -15,7 +15,6 @@ set(SRCS Src/ABI.cpp
Src/Misc.cpp
Src/MsgHandler.cpp
Src/NandPaths.cpp
- Src/OpenCL.cpp
Src/SDCardUtil.cpp
Src/StringUtil.cpp
Src/SymbolDB.cpp
@@ -24,7 +23,6 @@ set(SRCS Src/ABI.cpp
Src/Thunk.cpp
Src/Timer.cpp
Src/Version.cpp
- Src/VideoBackendBase.cpp
Src/x64Analyzer.cpp
Src/x64Emitter.cpp
Src/Crypto/aes_cbc.cpp
diff --git a/Source/Core/Common/Common.vcproj b/Source/Core/Common/Common.vcproj
index dfc1b1fb88..c2f2f61d7b 100644
--- a/Source/Core/Common/Common.vcproj
+++ b/Source/Core/Common/Common.vcproj
@@ -705,14 +705,6 @@
RelativePath=".\Src\NandPaths.h"
>
-
-
-
-
@@ -853,14 +845,6 @@
RelativePath=".\Src\Version.cpp"
>
-
-
-
-
diff --git a/Source/Core/Common/Common.vcxproj b/Source/Core/Common/Common.vcxproj
index 2e8e099c65..c8f334313b 100644
--- a/Source/Core/Common/Common.vcxproj
+++ b/Source/Core/Common/Common.vcxproj
@@ -254,7 +254,6 @@
-
Create
@@ -271,7 +270,6 @@
-
@@ -311,8 +309,6 @@
-
-
@@ -334,4 +330,4 @@
-
\ No newline at end of file
+
diff --git a/Source/Core/Common/Src/SConscript b/Source/Core/Common/Src/SConscript
index 90e0f7dca4..e5b7d71bfb 100644
--- a/Source/Core/Common/Src/SConscript
+++ b/Source/Core/Common/Src/SConscript
@@ -29,7 +29,6 @@ files = [
"Misc.cpp",
"MsgHandler.cpp",
"NandPaths.cpp",
- "OpenCL.cpp",
"SDCardUtil.cpp",
"StringUtil.cpp",
"SymbolDB.cpp",
@@ -38,7 +37,6 @@ files = [
"Thunk.cpp",
"Timer.cpp",
"Version.cpp",
- "VideoBackendBase.cpp",
"x64Emitter.cpp",
"x64Analyzer.cpp",
"Crypto/aes_cbc.cpp",
diff --git a/Source/Core/Core/CMakeLists.txt b/Source/Core/Core/CMakeLists.txt
index 93e2bf9f3f..d7845748b3 100644
--- a/Source/Core/Core/CMakeLists.txt
+++ b/Source/Core/Core/CMakeLists.txt
@@ -16,6 +16,7 @@ set(SRCS Src/ActionReplay.cpp
Src/State.cpp
Src/stdafx.cpp
Src/Tracer.cpp
+ Src/VideoBackendBase.cpp
Src/VolumeHandler.cpp
Src/Boot/Boot_BS2Emu.cpp
Src/Boot/Boot.cpp
diff --git a/Source/Core/Core/Core.vcproj b/Source/Core/Core/Core.vcproj
index 62b79fe3e5..2428f5c122 100644
--- a/Source/Core/Core/Core.vcproj
+++ b/Source/Core/Core/Core.vcproj
@@ -2061,6 +2061,14 @@
RelativePath=".\Src\Tracer.h"
>
+
+
+
+
diff --git a/Source/Core/Core/Core.vcxproj b/Source/Core/Core/Core.vcxproj
index 6916259b39..5ccdbd7814 100644
--- a/Source/Core/Core/Core.vcxproj
+++ b/Source/Core/Core/Core.vcxproj
@@ -449,6 +449,7 @@
Create
+
@@ -613,6 +614,7 @@
+
@@ -642,4 +644,4 @@
-
\ No newline at end of file
+
diff --git a/Source/Core/Core/Src/SConscript b/Source/Core/Core/Src/SConscript
index 20a221757f..e865a8de5b 100644
--- a/Source/Core/Core/Src/SConscript
+++ b/Source/Core/Core/Src/SConscript
@@ -19,6 +19,7 @@ files = [
"LuaInterface.cpp",
"State.cpp",
"Tracer.cpp",
+ "VideoBackendBase.cpp",
"VolumeHandler.cpp",
"Boot/Boot.cpp",
"Boot/Boot_BS2Emu.cpp",
diff --git a/Source/Core/Common/Src/VideoBackendBase.cpp b/Source/Core/Core/Src/VideoBackendBase.cpp
similarity index 100%
rename from Source/Core/Common/Src/VideoBackendBase.cpp
rename to Source/Core/Core/Src/VideoBackendBase.cpp
diff --git a/Source/Core/Common/Src/VideoBackendBase.h b/Source/Core/Core/Src/VideoBackendBase.h
similarity index 100%
rename from Source/Core/Common/Src/VideoBackendBase.h
rename to Source/Core/Core/Src/VideoBackendBase.h
diff --git a/Source/Core/DolphinWX/Src/SConscript b/Source/Core/DolphinWX/Src/SConscript
index 245373fd18..9ebdd5114c 100644
--- a/Source/Core/DolphinWX/Src/SConscript
+++ b/Source/Core/DolphinWX/Src/SConscript
@@ -56,7 +56,7 @@ else:
env.StaticLibrary(env['local_libs'] + "dolphinwx", libfiles)
- wxlibs += ['debwx', 'debugger_ui_util', 'dolphinwx', 'videouicommon']
+ wxlibs += ['debwx', 'debugger_ui_util', 'dolphinwx']
if sys.platform == 'win32':
files += [ "stdafx.cpp" ]
@@ -136,4 +136,7 @@ else:
libs = wxlibs + libs + env['LIBS']
linkflags = ldflags + env['LINKFLAGS']
+if env['HAVE_WX']:
+ libs += ['videouicommon']
+
env.Program(exe, files, LIBS = libs, LINKFLAGS = linkflags)
diff --git a/Source/Core/VideoCommon/CMakeLists.txt b/Source/Core/VideoCommon/CMakeLists.txt
index c3bc541084..a3646bb627 100644
--- a/Source/Core/VideoCommon/CMakeLists.txt
+++ b/Source/Core/VideoCommon/CMakeLists.txt
@@ -36,6 +36,7 @@ set(SRCS Src/BPMemory.cpp
Src/XFBConvert.cpp
Src/XFMemory.cpp
Src/XFStructs.cpp
+ Src/OpenCL.cpp)
Src/OpenCL/OCLTextureDecoder.cpp)
if(wxWidgets_FOUND AND WIN32)
diff --git a/Source/Core/VideoCommon/Src/EmuWindow.cpp b/Source/Core/VideoCommon/Src/EmuWindow.cpp
index 22ec1e78eb..3abbbc76df 100644
--- a/Source/Core/VideoCommon/Src/EmuWindow.cpp
+++ b/Source/Core/VideoCommon/Src/EmuWindow.cpp
@@ -25,8 +25,6 @@
#include "VideoBackendBase.h"
#include "Core.h"
-int OSDChoice = 0 , OSDTime = 0, OSDInternalW = 0, OSDInternalH = 0;
-
namespace EmuWindow
{
HWND m_hWnd = NULL;
diff --git a/Source/Core/Common/Src/OpenCL.cpp b/Source/Core/VideoCommon/Src/OpenCL.cpp
similarity index 100%
rename from Source/Core/Common/Src/OpenCL.cpp
rename to Source/Core/VideoCommon/Src/OpenCL.cpp
diff --git a/Source/Core/Common/Src/OpenCL.h b/Source/Core/VideoCommon/Src/OpenCL.h
similarity index 100%
rename from Source/Core/Common/Src/OpenCL.h
rename to Source/Core/VideoCommon/Src/OpenCL.h
diff --git a/Source/Core/VideoCommon/Src/RenderBase.cpp b/Source/Core/VideoCommon/Src/RenderBase.cpp
index 7b99d2f6b2..15bf3795a6 100644
--- a/Source/Core/VideoCommon/Src/RenderBase.cpp
+++ b/Source/Core/VideoCommon/Src/RenderBase.cpp
@@ -40,7 +40,7 @@
// TODO: Move these out of here.
int frameCount;
-//int OSDChoice, OSDTime, OSDInternalW, OSDInternalH;
+int OSDChoice, OSDTime;
Renderer *g_renderer;
diff --git a/Source/Core/VideoCommon/Src/SConscript b/Source/Core/VideoCommon/Src/SConscript
index 9bc96706c9..898630f212 100644
--- a/Source/Core/VideoCommon/Src/SConscript
+++ b/Source/Core/VideoCommon/Src/SConscript
@@ -18,6 +18,7 @@ files = [
'MainBase.cpp',
'OnScreenDisplay.cpp',
'OpcodeDecoding.cpp',
+ 'OpenCL.cpp',
'OpenCL/OCLTextureDecoder.cpp',
'PixelEngine.cpp',
'PixelShaderGen.cpp',
diff --git a/Source/Core/VideoCommon/VideoCommon.vcproj b/Source/Core/VideoCommon/VideoCommon.vcproj
index 6a49185180..5f20ed54a8 100644
--- a/Source/Core/VideoCommon/VideoCommon.vcproj
+++ b/Source/Core/VideoCommon/VideoCommon.vcproj
@@ -712,6 +712,14 @@
+
+
+
+
diff --git a/Source/Core/VideoCommon/VideoCommon.vcxproj b/Source/Core/VideoCommon/VideoCommon.vcxproj
index 72ca233e44..8a47957c69 100644
--- a/Source/Core/VideoCommon/VideoCommon.vcxproj
+++ b/Source/Core/VideoCommon/VideoCommon.vcxproj
@@ -248,6 +248,7 @@
+
@@ -293,6 +294,7 @@
+
@@ -350,4 +352,4 @@
-
\ No newline at end of file
+
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
index 4ae7ea9426..add592047e 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
@@ -96,9 +96,9 @@ CGprofile g_cgfProf;
#endif
#ifdef _WIN32
-extern int OSDChoice, OSDTime, OSDInternalW, OSDInternalH;
+extern int OSDInternalW, OSDInternalH;
#else
-int OSDChoice, OSDTime, OSDInternalW, OSDInternalH;
+int OSDInternalW, OSDInternalH;
#endif
namespace OGL