diff --git a/neo/renderer/qgl.h b/neo/renderer/qgl.h index 7632136b..846a0d74 100644 --- a/neo/renderer/qgl.h +++ b/neo/renderer/qgl.h @@ -96,6 +96,10 @@ extern void ( APIENTRY *qglColorTableEXT)( int, int, int, int, int, const void * extern PFNGLACTIVESTENCILFACEEXTPROC qglActiveStencilFaceEXT; // DG: couldn't find any extension for this, it's supported in GL2.0 and newer, incl OpenGL ES2.0 +// SE: work around missing function definition on legacy Mac OS X versions +#if defined(OSX_TIGER) || defined(OSX_LEOPARD) +typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +#endif extern PFNGLSTENCILOPSEPARATEPROC qglStencilOpSeparate; // ARB_texture_compression diff --git a/neo/sys/glimp.cpp b/neo/sys/glimp.cpp index 95501dd3..322ac21a 100644 --- a/neo/sys/glimp.cpp +++ b/neo/sys/glimp.cpp @@ -246,6 +246,7 @@ bool GLimp_Init(glimpParms_t parms) { #if SDL_VERSION_ATLEAST(2, 0, 0) int displayIndex = 0; +#if SDL_VERSION_ATLEAST(2, 0, 4) // try to put the window on the display the mousecursor currently is on { int x, y; @@ -264,6 +265,7 @@ bool GLimp_Init(glimpParms_t parms) { } } } +#endif window = SDL_CreateWindow(ENGINE_VERSION, SDL_WINDOWPOS_UNDEFINED_DISPLAY(displayIndex), diff --git a/neo/sys/platform.h b/neo/sys/platform.h index 4e78868c..ac27a08e 100644 --- a/neo/sys/platform.h +++ b/neo/sys/platform.h @@ -200,6 +200,18 @@ If you have questions concerning this license or the applicable additional terms #undef FindText // stupid namespace poluting Microsoft monkeys #endif +// Apple legacy +#ifdef __APPLE__ +#include +#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED +#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1040 +#define OSX_TIGER +#elif __MAC_OS_X_VERSION_MIN_REQUIRED < 1060 +#define OSX_LEOPARD +#endif +#endif +#endif + #define ID_TIME_T time_t typedef unsigned char byte; // 8 bits diff --git a/neo/sys/posix/posix_main.cpp b/neo/sys/posix/posix_main.cpp index 58c878f5..884349b8 100644 --- a/neo/sys/posix/posix_main.cpp +++ b/neo/sys/posix/posix_main.cpp @@ -401,7 +401,7 @@ int Sys_GetDriveFreeSpace( const char *path ) { static const int crashSigs[] = { SIGILL, SIGABRT, SIGFPE, SIGSEGV }; static const char* crashSigNames[] = { "SIGILL", "SIGABRT", "SIGFPE", "SIGSEGV" }; -#if ( defined(__linux__) && defined(__GLIBC__) ) || defined(__FreeBSD__) || defined(__APPLE__) +#if ( defined(__linux__) && defined(__GLIBC__) ) || defined(__FreeBSD__) || (defined(__APPLE__) && !defined(OSX_TIGER)) #define D3_HAVE_BACKTRACE #include #endif