mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-04-19 17:01:48 +00:00
Tidy up legacy Mac OS X & SDL2 fixes
This commit is contained in:
parent
cecd2151ed
commit
d6c33e9777
3 changed files with 6 additions and 7 deletions
|
@ -246,14 +246,11 @@ 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;
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 4)
|
||||
SDL_GetGlobalMouseState(&x, &y);
|
||||
#else
|
||||
x = y = 0;
|
||||
#endif
|
||||
|
||||
int numDisplays = SDL_GetNumVideoDisplays();
|
||||
for ( int j=0; j<numDisplays; ++j ) {
|
||||
|
@ -268,6 +265,7 @@ bool GLimp_Init(glimpParms_t parms) {
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
window = SDL_CreateWindow(ENGINE_VERSION,
|
||||
SDL_WINDOWPOS_UNDEFINED_DISPLAY(displayIndex),
|
||||
|
|
|
@ -200,13 +200,14 @@ 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 <Availability.h>
|
||||
#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
|
||||
#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1040
|
||||
#define OSX_TIGER 1
|
||||
#define OSX_TIGER
|
||||
#elif __MAC_OS_X_VERSION_MIN_REQUIRED < 1060
|
||||
#define OSX_LEOPARD 1
|
||||
#define OSX_LEOPARD
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -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__) && !OSX_TIGER)
|
||||
#if ( defined(__linux__) && defined(__GLIBC__) ) || defined(__FreeBSD__) || (defined(__APPLE__) && !defined(OSX_TIGER))
|
||||
#define D3_HAVE_BACKTRACE
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue