Rename the interface files and hopefully fix OSX building.

This commit is contained in:
Ryan Houdek 2012-12-25 19:08:24 -06:00
parent 09b05c0f6c
commit 01953ff64a
16 changed files with 29 additions and 25 deletions

View File

@ -178,6 +178,10 @@ if(APPLE)
# page on x86_64 is 4GB in size. # page on x86_64 is 4GB in size.
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-pagezero_size,0x1000") 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(APPKIT_LIBRARY AppKit)
find_library(APPSERV_LIBRARY ApplicationServices) find_library(APPSERV_LIBRARY ApplicationServices)
find_library(ATB_LIBRARY AudioToolbox) find_library(ATB_LIBRARY AudioToolbox)

View File

@ -60,11 +60,6 @@ private:
#undef STACKALIGN #undef STACKALIGN
#define STACKALIGN __attribute__((__force_align_arg_pointer__)) #define STACKALIGN __attribute__((__force_align_arg_pointer__))
#endif #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 #elif defined _WIN32

View File

@ -85,20 +85,26 @@ endif()
if(USE_EGL) if(USE_EGL)
set(SRCS ${SRCS} set(SRCS ${SRCS}
Src/VideoInterface/EGL.cpp Src/GLInterface/EGL.cpp
) )
else() else()
if(WIN32) if(WIN32)
set(SRCS ${SRCS} set(SRCS ${SRCS}
Src/VideoInterface/GLW.cpp Src/GLInterface/GLW.cpp
) )
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(SRCS ${SRCS} if(USE_WX)
Src/VideoInterface/AGL.cpp set(SRCS ${SRCS}
) Src/GLInterface/WX.cpp
)
else()
set(SRCS ${SRCS}
Src/GLInterface/AGL.cpp
)
endif()
else() else()
set(SRCS ${SRCS} set(SRCS ${SRCS}
Src/VideoInterface/GLX.cpp Src/GLInterface/GLX.cpp
) )
endif() endif()
endif() endif()

View File

@ -14,21 +14,21 @@
// Official SVN repository and contact information can be found at // Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/ // http://code.google.com/p/dolphin-emu/
#ifndef _VIDEOINTERFACE_H_ #ifndef _GLINTERFACE_H_
#define _VIDEOINTERFACE_H_ #define _GLINTERFACE_H_
#include "Thread.h" #include "Thread.h"
#if defined(USE_EGL) && USE_EGL #if defined(USE_EGL) && USE_EGL
#include "VideoInterface/EGL.h" #include "GLInterface/EGL.h"
#elif defined(USE_WX) && USE_WX #elif defined(USE_WX) && USE_WX
#include "VideoInterface/WX.h" #include "GLInterface/WX.h"
#elif defined(__APPLE__) #elif defined(__APPLE__)
#include "VideoInterface/AGL.h" #include "GLInterface/AGL.h"
#elif defined(_WIN32) #elif defined(_WIN32)
#include "VideoInterface/WGL.h" #include "GLInterface/WGL.h"
#elif defined(HAVE_X11) && HAVE_X11 #elif defined(HAVE_X11) && HAVE_X11
#include "VideoInterface/GLX.h" #include "GLInterface/GLX.h"
#endif #endif
typedef struct { typedef struct {

View File

@ -20,7 +20,7 @@
#include "RenderBase.h" #include "RenderBase.h"
#include "VertexShaderManager.h" #include "VertexShaderManager.h"
#include "../GLVideoInterface.h" #include "../GLInterface.h"
#include "AGL.h" #include "AGL.h"
void cInterfaceAGL::SwapBuffers() void cInterfaceAGL::SwapBuffers()

View File

@ -20,7 +20,7 @@
#include "RenderBase.h" #include "RenderBase.h"
#include "VertexShaderManager.h" #include "VertexShaderManager.h"
#include "../GLVideoInterface.h" #include "../GLInterface.h"
#include "EGL.h" #include "EGL.h"
void cInterfaceEGL::CreateXWindow(void) void cInterfaceEGL::CreateXWindow(void)
@ -294,7 +294,6 @@ bool cInterfaceEGL::CreateWindow(void *&window_handle)
if (GLWin.parent == 0) if (GLWin.parent == 0)
GLWin.parent = RootWindow(GLWin.x_dpy, GLWin.screen); GLWin.parent = RootWindow(GLWin.x_dpy, GLWin.screen);
unsigned long mask;
XVisualInfo visTemplate; XVisualInfo visTemplate;
int num_visuals; int num_visuals;
EGLConfig config; EGLConfig config;

View File

@ -20,7 +20,7 @@
#include "RenderBase.h" #include "RenderBase.h"
#include "VertexShaderManager.h" #include "VertexShaderManager.h"
#include "../GLVideoInterface.h" #include "../GLInterface.h"
#include "GLX.h" #include "GLX.h"
void cInterfaceGLX::CreateXWindow(void) void cInterfaceGLX::CreateXWindow(void)

View File

@ -20,7 +20,7 @@
#include "RenderBase.h" #include "RenderBase.h"
#include "VertexShaderManager.h" #include "VertexShaderManager.h"
#include "../GLVideoInterface.h" #include "../GLInterface.h"
#include "WGL.h" #include "WGL.h"
#include "EmuWindow.h" #include "EmuWindow.h"

View File

@ -20,7 +20,7 @@
#include "RenderBase.h" #include "RenderBase.h"
#include "VertexShaderManager.h" #include "VertexShaderManager.h"
#include "../GLVideoInterface.h" #include "../GLInterface.h"
#include "WX.h" #include "WX.h"
void cInterfaceWX::SwapBuffers() void cInterfaceWX::SwapBuffers()

View File

@ -20,7 +20,7 @@
#include "VideoConfig.h" #include "VideoConfig.h"
#include "MathUtil.h" #include "MathUtil.h"
#include "GLVideoInterface.h" #include "GLInterface.h"
#ifndef GL_DEPTH24_STENCIL8_EXT // allows FBOs to support stencils #ifndef GL_DEPTH24_STENCIL8_EXT // allows FBOs to support stencils
#define GL_DEPTH_STENCIL_EXT 0x84F9 #define GL_DEPTH_STENCIL_EXT 0x84F9