(view as text)
diff --git a/Source/Core/DolphinWX/CMakeLists.txt b/Source/Core/DolphinWX/CMakeLists.txt
index a35f1ba..58ba72a 100644
--- a/Source/Core/DolphinWX/CMakeLists.txt
+++ b/Source/Core/DolphinWX/CMakeLists.txt
@@ -105,6 +105,7 @@ else()
 	endif()
 endif()
 
+set(SRCS ${SRCS} Src/GLInterface.cpp)
 if(USE_EGL)
 	set(SRCS ${SRCS} Src/GLInterface/Platform.cpp
 		Src/GLInterface/EGL.cpp)	
diff --git a/Source/Core/DolphinWX/DolphinWX.vcxproj b/Source/Core/DolphinWX/DolphinWX.vcxproj
index 14eacfd..f6d9ba6 100644
--- a/Source/Core/DolphinWX/DolphinWX.vcxproj
+++ b/Source/Core/DolphinWX/DolphinWX.vcxproj
@@ -82,6 +82,7 @@
     <ClCompile Include="Src\FrameTools.cpp" />
     <ClCompile Include="Src\GameListCtrl.cpp" />
     <ClCompile Include="Src\GeckoCodeDiag.cpp" />
+    <ClCompile Include="Src\GLInterface.cpp" />
     <ClCompile Include="Src\GLInterface\WGL.cpp" />
     <ClCompile Include="Src\HotkeyDlg.cpp" />
     <ClCompile Include="Src\InputConfigDiag.cpp" />
diff --git a/Source/Core/DolphinWX/Src/GLInterface.cpp b/Source/Core/DolphinWX/Src/GLInterface.cpp
new file mode 100644
index 0000000..75afed5
--- /dev/null
+++ b/Source/Core/DolphinWX/Src/GLInterface.cpp
@@ -0,0 +1,21 @@
+// Copyright 2013 Dolphin Emulator Project
+// Licensed under GPLv2
+// Refer to the license.txt file included.
+
+#include "GLInterface.h"
+
+GLWindow GLWin;
+cInterfaceBase *GLInterface;
+
+void InitInterface()
+{
+	#if defined(USE_EGL) && USE_EGL
+		GLInterface = new cInterfaceEGL;
+	#elif defined(__APPLE__)
+		GLInterface = new cInterfaceAGL;
+	#elif defined(_WIN32)
+		GLInterface = new cInterfaceWGL;
+	#elif defined(HAVE_X11) && HAVE_X11
+		GLInterface = new cInterfaceGLX;
+	#endif
+}
diff --git a/Source/Core/DolphinWX/Src/GLInterface.h b/Source/Core/DolphinWX/Src/GLInterface.h
index 56d03b6..4d49217 100644
--- a/Source/Core/DolphinWX/Src/GLInterface.h
+++ b/Source/Core/DolphinWX/Src/GLInterface.h
@@ -41,8 +41,11 @@ typedef struct {
 #endif
 } GLWindow;
 
+#endif
+
 extern cInterfaceBase *GLInterface;
 extern GLWindow GLWin;
 
-#endif
+void InitInterface();
+
 #endif
diff --git a/Source/Core/DolphinWX/Src/GLInterface/Platform.cpp b/Source/Core/DolphinWX/Src/GLInterface/Platform.cpp
index 8094eef..06d0023 100644
--- a/Source/Core/DolphinWX/Src/GLInterface/Platform.cpp
+++ b/Source/Core/DolphinWX/Src/GLInterface/Platform.cpp
@@ -17,6 +17,8 @@
 
 #include "Host.h"
 #include "Platform.h"
+#include "GLInterface.h"
+
 
 bool cPlatform::SelectDisplay(void)
 {
diff --git a/Source/Core/DolphinWX/Src/GLInterface/Platform.h b/Source/Core/DolphinWX/Src/GLInterface/Platform.h
index a6b9d59..b1ecc5d 100644
--- a/Source/Core/DolphinWX/Src/GLInterface/Platform.h
+++ b/Source/Core/DolphinWX/Src/GLInterface/Platform.h
@@ -155,7 +155,4 @@ typedef struct {
 #endif
 } GLWindow;
 
-extern cInterfaceBase *GLInterface;
-extern GLWindow GLWin;
-
 #endif
diff --git a/Source/Core/VideoBackends/OGL/Src/GLUtil.cpp b/Source/Core/VideoBackends/OGL/Src/GLUtil.cpp
index f2cf74a..8890360 100644
--- a/Source/Core/VideoBackends/OGL/Src/GLUtil.cpp
+++ b/Source/Core/VideoBackends/OGL/Src/GLUtil.cpp
@@ -13,9 +13,6 @@
 
 #include "GLUtil.h"
 
-GLWindow GLWin;
-cInterfaceBase *GLInterface;
-
 namespace OGL
 {
 
@@ -34,18 +31,6 @@ void VideoBackend::UpdateFPSDisplay(const char *text)
 }
 
 }
-void InitInterface()
-{
-	#if defined(USE_EGL) && USE_EGL
-		GLInterface = new cInterfaceEGL;
-	#elif defined(__APPLE__)
-		GLInterface = new cInterfaceAGL;
-	#elif defined(_WIN32)
-		GLInterface = new cInterfaceWGL;
-	#elif defined(HAVE_X11) && HAVE_X11
-		GLInterface = new cInterfaceGLX;
-	#endif
-}
 
 GLuint OpenGL_CompileProgram ( const char* vertexShader, const char* fragmentShader )
 {
diff --git a/Source/Core/VideoBackends/OGL/Src/GLUtil.h b/Source/Core/VideoBackends/OGL/Src/GLUtil.h
index 48466fe..03dcfe2 100644
--- a/Source/Core/VideoBackends/OGL/Src/GLUtil.h
+++ b/Source/Core/VideoBackends/OGL/Src/GLUtil.h
@@ -48,7 +48,6 @@
 #include <sys/types.h>
 
 #endif
-void InitInterface();
 
 // Helpers
 GLuint OpenGL_CompileProgram(const char *vertexShader, const char *fragmentShader);