From 01953ff64a1f6b8d4a6236d45400f5b208c4b079 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Tue, 25 Dec 2012 19:08:24 -0600 Subject: [PATCH] Rename the interface files and hopefully fix OSX building. --- CMakeLists.txt | 4 ++++ Source/Core/Common/Src/Common.h | 5 ----- Source/Core/DolphinWX/CMakeLists.txt | 18 ++++++++++++------ .../Src/{GLVideoInterface.h => GLInterface.h} | 14 +++++++------- .../{VideoInterface => GLInterface}/AGL.cpp | 2 +- .../Src/{VideoInterface => GLInterface}/AGL.h | 0 .../{VideoInterface => GLInterface}/EGL.cpp | 3 +-- .../Src/{VideoInterface => GLInterface}/EGL.h | 0 .../{VideoInterface => GLInterface}/GLX.cpp | 2 +- .../Src/{VideoInterface => GLInterface}/GLX.h | 0 .../InterfaceBase.h | 0 .../{VideoInterface => GLInterface}/WGL.cpp | 2 +- .../Src/{VideoInterface => GLInterface}/WGL.h | 0 .../Src/{VideoInterface => GLInterface}/WX.cpp | 2 +- .../Src/{VideoInterface => GLInterface}/WX.h | 0 Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h | 2 +- 16 files changed, 29 insertions(+), 25 deletions(-) rename Source/Core/DolphinWX/Src/{GLVideoInterface.h => GLInterface.h} (89%) rename Source/Core/DolphinWX/Src/{VideoInterface => GLInterface}/AGL.cpp (99%) rename Source/Core/DolphinWX/Src/{VideoInterface => GLInterface}/AGL.h (100%) rename Source/Core/DolphinWX/Src/{VideoInterface => GLInterface}/EGL.cpp (99%) rename Source/Core/DolphinWX/Src/{VideoInterface => GLInterface}/EGL.h (100%) rename Source/Core/DolphinWX/Src/{VideoInterface => GLInterface}/GLX.cpp (99%) rename Source/Core/DolphinWX/Src/{VideoInterface => GLInterface}/GLX.h (100%) rename Source/Core/DolphinWX/Src/{VideoInterface => GLInterface}/InterfaceBase.h (100%) rename Source/Core/DolphinWX/Src/{VideoInterface => GLInterface}/WGL.cpp (99%) rename Source/Core/DolphinWX/Src/{VideoInterface => GLInterface}/WGL.h (100%) rename Source/Core/DolphinWX/Src/{VideoInterface => GLInterface}/WX.cpp (98%) rename Source/Core/DolphinWX/Src/{VideoInterface => GLInterface}/WX.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 48788e835b..82f2b55d87 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -178,6 +178,10 @@ if(APPLE) # page on x86_64 is 4GB in size. set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-pagezero_size,0x1000") + if(NOT DISABLE_WX) + add_definitions(-DUSE_WX -DHAVE_WX) + set(USE_WX TRUE) + endif() find_library(APPKIT_LIBRARY AppKit) find_library(APPSERV_LIBRARY ApplicationServices) find_library(ATB_LIBRARY AudioToolbox) diff --git a/Source/Core/Common/Src/Common.h b/Source/Core/Common/Src/Common.h index 960bf75559..884a1e6c16 100644 --- a/Source/Core/Common/Src/Common.h +++ b/Source/Core/Common/Src/Common.h @@ -60,11 +60,6 @@ private: #undef STACKALIGN #define STACKALIGN __attribute__((__force_align_arg_pointer__)) #endif -// We use wxWidgets on OS X only if it is version 2.9+ with Cocoa support. -#ifdef __WXOSX_COCOA__ -#define HAVE_WX 1 -#define USE_WX 1 // Use wxGLCanvas -#endif #elif defined _WIN32 diff --git a/Source/Core/DolphinWX/CMakeLists.txt b/Source/Core/DolphinWX/CMakeLists.txt index fcc531029c..f54ff9f4e3 100644 --- a/Source/Core/DolphinWX/CMakeLists.txt +++ b/Source/Core/DolphinWX/CMakeLists.txt @@ -85,20 +85,26 @@ endif() if(USE_EGL) set(SRCS ${SRCS} - Src/VideoInterface/EGL.cpp + Src/GLInterface/EGL.cpp ) else() if(WIN32) set(SRCS ${SRCS} - Src/VideoInterface/GLW.cpp + Src/GLInterface/GLW.cpp ) elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - set(SRCS ${SRCS} - Src/VideoInterface/AGL.cpp - ) + if(USE_WX) + set(SRCS ${SRCS} + Src/GLInterface/WX.cpp + ) + else() + set(SRCS ${SRCS} + Src/GLInterface/AGL.cpp + ) + endif() else() set(SRCS ${SRCS} - Src/VideoInterface/GLX.cpp + Src/GLInterface/GLX.cpp ) endif() endif() diff --git a/Source/Core/DolphinWX/Src/GLVideoInterface.h b/Source/Core/DolphinWX/Src/GLInterface.h similarity index 89% rename from Source/Core/DolphinWX/Src/GLVideoInterface.h rename to Source/Core/DolphinWX/Src/GLInterface.h index d688335259..a7c069df4e 100644 --- a/Source/Core/DolphinWX/Src/GLVideoInterface.h +++ b/Source/Core/DolphinWX/Src/GLInterface.h @@ -14,21 +14,21 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#ifndef _VIDEOINTERFACE_H_ -#define _VIDEOINTERFACE_H_ +#ifndef _GLINTERFACE_H_ +#define _GLINTERFACE_H_ #include "Thread.h" #if defined(USE_EGL) && USE_EGL -#include "VideoInterface/EGL.h" +#include "GLInterface/EGL.h" #elif defined(USE_WX) && USE_WX -#include "VideoInterface/WX.h" +#include "GLInterface/WX.h" #elif defined(__APPLE__) -#include "VideoInterface/AGL.h" +#include "GLInterface/AGL.h" #elif defined(_WIN32) -#include "VideoInterface/WGL.h" +#include "GLInterface/WGL.h" #elif defined(HAVE_X11) && HAVE_X11 -#include "VideoInterface/GLX.h" +#include "GLInterface/GLX.h" #endif typedef struct { diff --git a/Source/Core/DolphinWX/Src/VideoInterface/AGL.cpp b/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp similarity index 99% rename from Source/Core/DolphinWX/Src/VideoInterface/AGL.cpp rename to Source/Core/DolphinWX/Src/GLInterface/AGL.cpp index 465f77c972..65b4b269d6 100644 --- a/Source/Core/DolphinWX/Src/VideoInterface/AGL.cpp +++ b/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp @@ -20,7 +20,7 @@ #include "RenderBase.h" #include "VertexShaderManager.h" -#include "../GLVideoInterface.h" +#include "../GLInterface.h" #include "AGL.h" void cInterfaceAGL::SwapBuffers() diff --git a/Source/Core/DolphinWX/Src/VideoInterface/AGL.h b/Source/Core/DolphinWX/Src/GLInterface/AGL.h similarity index 100% rename from Source/Core/DolphinWX/Src/VideoInterface/AGL.h rename to Source/Core/DolphinWX/Src/GLInterface/AGL.h diff --git a/Source/Core/DolphinWX/Src/VideoInterface/EGL.cpp b/Source/Core/DolphinWX/Src/GLInterface/EGL.cpp similarity index 99% rename from Source/Core/DolphinWX/Src/VideoInterface/EGL.cpp rename to Source/Core/DolphinWX/Src/GLInterface/EGL.cpp index bcf7acaff5..00d16ba504 100644 --- a/Source/Core/DolphinWX/Src/VideoInterface/EGL.cpp +++ b/Source/Core/DolphinWX/Src/GLInterface/EGL.cpp @@ -20,7 +20,7 @@ #include "RenderBase.h" #include "VertexShaderManager.h" -#include "../GLVideoInterface.h" +#include "../GLInterface.h" #include "EGL.h" void cInterfaceEGL::CreateXWindow(void) @@ -294,7 +294,6 @@ bool cInterfaceEGL::CreateWindow(void *&window_handle) if (GLWin.parent == 0) GLWin.parent = RootWindow(GLWin.x_dpy, GLWin.screen); - unsigned long mask; XVisualInfo visTemplate; int num_visuals; EGLConfig config; diff --git a/Source/Core/DolphinWX/Src/VideoInterface/EGL.h b/Source/Core/DolphinWX/Src/GLInterface/EGL.h similarity index 100% rename from Source/Core/DolphinWX/Src/VideoInterface/EGL.h rename to Source/Core/DolphinWX/Src/GLInterface/EGL.h diff --git a/Source/Core/DolphinWX/Src/VideoInterface/GLX.cpp b/Source/Core/DolphinWX/Src/GLInterface/GLX.cpp similarity index 99% rename from Source/Core/DolphinWX/Src/VideoInterface/GLX.cpp rename to Source/Core/DolphinWX/Src/GLInterface/GLX.cpp index 63458f7a4d..cbe749845e 100644 --- a/Source/Core/DolphinWX/Src/VideoInterface/GLX.cpp +++ b/Source/Core/DolphinWX/Src/GLInterface/GLX.cpp @@ -20,7 +20,7 @@ #include "RenderBase.h" #include "VertexShaderManager.h" -#include "../GLVideoInterface.h" +#include "../GLInterface.h" #include "GLX.h" void cInterfaceGLX::CreateXWindow(void) diff --git a/Source/Core/DolphinWX/Src/VideoInterface/GLX.h b/Source/Core/DolphinWX/Src/GLInterface/GLX.h similarity index 100% rename from Source/Core/DolphinWX/Src/VideoInterface/GLX.h rename to Source/Core/DolphinWX/Src/GLInterface/GLX.h diff --git a/Source/Core/DolphinWX/Src/VideoInterface/InterfaceBase.h b/Source/Core/DolphinWX/Src/GLInterface/InterfaceBase.h similarity index 100% rename from Source/Core/DolphinWX/Src/VideoInterface/InterfaceBase.h rename to Source/Core/DolphinWX/Src/GLInterface/InterfaceBase.h diff --git a/Source/Core/DolphinWX/Src/VideoInterface/WGL.cpp b/Source/Core/DolphinWX/Src/GLInterface/WGL.cpp similarity index 99% rename from Source/Core/DolphinWX/Src/VideoInterface/WGL.cpp rename to Source/Core/DolphinWX/Src/GLInterface/WGL.cpp index 9abcd52fc6..99f861e019 100644 --- a/Source/Core/DolphinWX/Src/VideoInterface/WGL.cpp +++ b/Source/Core/DolphinWX/Src/GLInterface/WGL.cpp @@ -20,7 +20,7 @@ #include "RenderBase.h" #include "VertexShaderManager.h" -#include "../GLVideoInterface.h" +#include "../GLInterface.h" #include "WGL.h" #include "EmuWindow.h" diff --git a/Source/Core/DolphinWX/Src/VideoInterface/WGL.h b/Source/Core/DolphinWX/Src/GLInterface/WGL.h similarity index 100% rename from Source/Core/DolphinWX/Src/VideoInterface/WGL.h rename to Source/Core/DolphinWX/Src/GLInterface/WGL.h diff --git a/Source/Core/DolphinWX/Src/VideoInterface/WX.cpp b/Source/Core/DolphinWX/Src/GLInterface/WX.cpp similarity index 98% rename from Source/Core/DolphinWX/Src/VideoInterface/WX.cpp rename to Source/Core/DolphinWX/Src/GLInterface/WX.cpp index 7126ccb8ba..bf6b2abf33 100644 --- a/Source/Core/DolphinWX/Src/VideoInterface/WX.cpp +++ b/Source/Core/DolphinWX/Src/GLInterface/WX.cpp @@ -20,7 +20,7 @@ #include "RenderBase.h" #include "VertexShaderManager.h" -#include "../GLVideoInterface.h" +#include "../GLInterface.h" #include "WX.h" void cInterfaceWX::SwapBuffers() diff --git a/Source/Core/DolphinWX/Src/VideoInterface/WX.h b/Source/Core/DolphinWX/Src/GLInterface/WX.h similarity index 100% rename from Source/Core/DolphinWX/Src/VideoInterface/WX.h rename to Source/Core/DolphinWX/Src/GLInterface/WX.h diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h index 2c131fb937..09d38bb731 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h @@ -20,7 +20,7 @@ #include "VideoConfig.h" #include "MathUtil.h" -#include "GLVideoInterface.h" +#include "GLInterface.h" #ifndef GL_DEPTH24_STENCIL8_EXT // allows FBOs to support stencils #define GL_DEPTH_STENCIL_EXT 0x84F9