From 748e217a195627476cf108554512254730c780e8 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Fri, 4 Jan 2013 17:28:13 +0000 Subject: [PATCH] Bring the SDL.h include in SDLMain.m up to speed with driver_sdl.c in jaudiolib and sdl_inc.h in the engine. Also address some Apple macro problems. git-svn-id: https://svn.eduke32.com/eduke32@3368 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/Apple/SDLMain.m | 8 +++++++- polymer/eduke32/Makefile.common | 2 +- polymer/eduke32/build/src/sdlayer.c | 7 +------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/polymer/eduke32/Apple/SDLMain.m b/polymer/eduke32/Apple/SDLMain.m index 70bf7ec61..ae3446229 100644 --- a/polymer/eduke32/Apple/SDLMain.m +++ b/polymer/eduke32/Apple/SDLMain.m @@ -5,8 +5,14 @@ Feel free to customize this file to suit your needs */ -#include "SDL.h" +#if defined(SDL_FRAMEWORK) +# include +#else +# include "SDL.h" +#endif + #include "SDLMain.h" + #include /* for MAXPATHLEN */ #include diff --git a/polymer/eduke32/Makefile.common b/polymer/eduke32/Makefile.common index c5b64fccd..1056bfe74 100644 --- a/polymer/eduke32/Makefile.common +++ b/polymer/eduke32/Makefile.common @@ -121,7 +121,7 @@ EXESUFFIX_OVERRIDE ?= # Mac OS X Frameworks location # Like above, use absolute paths. APPLE_FRAMEWORKS ?=/Library/Frameworks -# Since the OS X startup window is generating errors, give it an off switch. +# Without the resource files packaged in the .app bundle, the startupwindow produces errors, so give it an off switch. OSX_STARTUPWINDOW ?= 1 # Engine options diff --git a/polymer/eduke32/build/src/sdlayer.c b/polymer/eduke32/build/src/sdlayer.c index 5eb9c562c..25a8a146e 100644 --- a/polymer/eduke32/build/src/sdlayer.c +++ b/polymer/eduke32/build/src/sdlayer.c @@ -39,17 +39,12 @@ # include "gtkbits.h" #endif -#if defined __APPLE__ || !defined HAVE_GTK2 -# undef UNREFERENCED_PARAMETER -# define UNREFERENCED_PARAMETER(x) x=x - -# if !defined _WIN32 && (!defined __APPLE__ || !defined OSX_STARTUPWINDOW) +#if !defined _WIN32 && !defined HAVE_GTK2 && !defined __APPLE__ int32_t startwin_open(void) { return 0; } int32_t startwin_close(void) { return 0; } int32_t startwin_puts(const char *s) { UNREFERENCED_PARAMETER(s); return 0; } int32_t startwin_idle(void *s) { UNREFERENCED_PARAMETER(s); return 0; } int32_t startwin_settitle(const char *s) { UNREFERENCED_PARAMETER(s); return 0; } -# endif #endif #if SDL_MAJOR_VERSION==2