diff --git a/desmume/src/OGLRender.cpp b/desmume/src/OGLRender.cpp index fa7597edc..471256259 100644 --- a/desmume/src/OGLRender.cpp +++ b/desmume/src/OGLRender.cpp @@ -50,14 +50,16 @@ static void ENDGL() { #include #include #include -#else -#ifdef __APPLE__ +#elif defined(__APPLE__) #include #include #include - #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 - #include "cocoa/macosx_10_4_compat.h" + // Overrides for GL_EXT_framebuffer_blit (not available in Mac OS X v10.4) + #if !defined(GL_ARB_framebuffer_object) && !defined(GL_EXT_framebuffer_blit) + #define GL_READ_FRAMEBUFFER_EXT GL_FRAMEBUFFER_EXT + #define GL_DRAW_FRAMEBUFFER_EXT GL_FRAMEBUFFER_EXT + #define glBlitFramebufferEXT(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter) #endif // We're not exactly committing to OpenGL 3.2 Core Profile just yet, so redefine APPLE @@ -72,10 +74,9 @@ static void ENDGL() { #include /* This is a workaround needed to compile against nvidia GL headers */ #ifndef GL_ALPHA_BLEND_EQUATION_ATI - #undef GL_VERSION_1_3 + #undef GL_VERSION_1_3 #endif #endif -#endif #include "types.h" #include "debug.h" diff --git a/desmume/src/cocoa/macosx_10_4_compat.h b/desmume/src/cocoa/macosx_10_4_compat.h index d6165e417..d32b3b977 100644 --- a/desmume/src/cocoa/macosx_10_4_compat.h +++ b/desmume/src/cocoa/macosx_10_4_compat.h @@ -39,10 +39,4 @@ typedef float CGFloat; #define CGFLOAT_IS_DOUBLE 0 #endif -// Overrides for GL_EXT_framebuffer_blit (not available in Mac OS X v10.4) -#if !defined(GL_ARB_framebuffer_object) || !defined(GL_EXT_framebuffer_blit) -#define GL_READ_FRAMEBUFFER_EXT 0x8CA8 -#define glBlitFramebufferEXT(a, b, c, d, e, f, g, h, i, j) -#endif - #endif // MACOSX_10_4_COMPATIBILITY_H