diff options
Diffstat (limited to 'backends/platform')
-rw-r--r-- | backends/platform/sdl/sdl-sys.h | 23 | ||||
-rw-r--r-- | backends/platform/sdl/sdl.cpp | 16 |
2 files changed, 37 insertions, 2 deletions
diff --git a/backends/platform/sdl/sdl-sys.h b/backends/platform/sdl/sdl-sys.h index 63bfc58617..ca3c586e03 100644 --- a/backends/platform/sdl/sdl-sys.h +++ b/backends/platform/sdl/sdl-sys.h @@ -27,7 +27,7 @@ // fashion, even on the Symbian port. // Moreover, it contains a workaround for the fact that SDL_rwops.h uses // a FILE pointer in one place, which conflicts with common/forbidden.h. - +// The SDL 1.3 headers also include strings.h #include "common/scummsys.h" @@ -39,6 +39,16 @@ typedef struct { int FAKE; } FAKE_FILE; #define FILE FAKE_FILE #endif +#if !defined(FORBIDDEN_SYMBOL_ALLOW_ALL) && !defined(FORBIDDEN_SYMBOL_EXCEPTION_strcasecmp) +#undef strcasecmp +#define strcasecmp FAKE_strcasecmp +#endif + +#if !defined(FORBIDDEN_SYMBOL_ALLOW_ALL) && !defined(FORBIDDEN_SYMBOL_EXCEPTION_strncasecmp) +#undef strncasecmp +#define strncasecmp FAKE_strncasecmp +#endif + #if defined(__SYMBIAN32__) #include <esdl\SDL.h> #else @@ -51,4 +61,15 @@ typedef struct { int FAKE; } FAKE_FILE; #define FILE FORBIDDEN_SYMBOL_REPLACEMENT #endif +#if !defined(FORBIDDEN_SYMBOL_ALLOW_ALL) && !defined(FORBIDDEN_SYMBOL_EXCEPTION_strcasecmp) +#undef strcasecmp +#define strcasecmp FORBIDDEN_SYMBOL_REPLACEMENT +#endif + +#if !defined(FORBIDDEN_SYMBOL_ALLOW_ALL) && !defined(FORBIDDEN_SYMBOL_EXCEPTION_strncasecmp) +#undef strncasecmp +#define strncasecmp FORBIDDEN_SYMBOL_REPLACEMENT +#endif + + #endif diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index ecaeabf4e1..7972b19689 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -34,7 +34,14 @@ #include "common/textconsole.h" #include "backends/saves/default/default-saves.h" + +// Audio CD support was removed with SDL 1.3 +#if SDL_VERSION_ATLEAST(1, 3, 0) +#include "backends/audiocd/default/default-audiocd.h" +#else #include "backends/audiocd/sdl/sdl-audiocd.h" +#endif + #include "backends/events/sdl/sdl-events.h" #include "backends/mutex/sdl/sdl-mutex.h" #include "backends/timer/sdl/sdl-timer.h" @@ -182,8 +189,15 @@ void OSystem_SDL::initBackend() { _mixerManager->init(); } - if (_audiocdManager == 0) + if (_audiocdManager == 0) { + // Audio CD support was removed with SDL 1.3 +#if SDL_VERSION_ATLEAST(1, 3, 0) + _audiocdManager = new DefaultAudioCDManager(); +#else _audiocdManager = new SdlAudioCDManager(); +#endif + + } // Setup a custom program icon. setupIcon(); |