aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/sdl
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r--backends/platform/sdl/sdl-sys.h13
-rw-r--r--backends/platform/sdl/sdl.cpp3
-rw-r--r--backends/platform/sdl/win32/win32.cpp6
3 files changed, 13 insertions, 9 deletions
diff --git a/backends/platform/sdl/sdl-sys.h b/backends/platform/sdl/sdl-sys.h
index 57310807a8..23a25f0a82 100644
--- a/backends/platform/sdl/sdl-sys.h
+++ b/backends/platform/sdl/sdl-sys.h
@@ -26,16 +26,21 @@
#ifndef BACKEND_SDL_SYS_H
#define BACKEND_SDL_SYS_H
-// Include the SDL headers, working around the fact that SDL_rwops.h
-// uses a FILE pointer in one place, which conflicts with common/forbidden.h
+// The purpose of this header is to include the SDL headers in a uniform
+// 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.
+
#include "common/scummsys.h"
// Remove FILE override from common/forbidden.h, and replace
// it with an alternate slightly less unfriendly override.
+#if !defined(FORBIDDEN_SYMBOL_ALLOW_ALL) && !defined(FORBIDDEN_SYMBOL_EXCEPTION_FILE)
#undef FILE
typedef struct { int FAKE; } FAKE_FILE;
#define FILE FAKE_FILE
+#endif
#if defined(__SYMBIAN32__)
#include <esdl\SDL.h>
@@ -43,8 +48,10 @@ typedef struct { int FAKE; } FAKE_FILE;
#include <SDL.h>
#endif
-// Finally forbid FILE again
+// Finally forbid FILE again (if it was forbidden to start with)
+#if !defined(FORBIDDEN_SYMBOL_ALLOW_ALL) && !defined(FORBIDDEN_SYMBOL_EXCEPTION_FILE)
#undef FILE
#define FILE FORBIDDEN_SYMBOL_REPLACEMENT
+#endif
#endif
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 8d9694b4f7..82ff537c51 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -23,9 +23,6 @@
*
*/
-// Disable symbol overrides so that we can use system headers.
-#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
-
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
diff --git a/backends/platform/sdl/win32/win32.cpp b/backends/platform/sdl/win32/win32.cpp
index 9723d1f68e..01471e9cb2 100644
--- a/backends/platform/sdl/win32/win32.cpp
+++ b/backends/platform/sdl/win32/win32.cpp
@@ -23,6 +23,9 @@
*
*/
+// Disable symbol overrides so that we can use system headers.
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
#include "common/scummsys.h"
#ifdef WIN32
@@ -31,9 +34,6 @@
#include <windows.h>
#undef ARRAYSIZE // winnt.h defines ARRAYSIZE, but we want our own one...
-// Disable symbol overrides so that we can use system headers.
-#define FORBIDDEN_SYMBOL_ALLOW_ALL
-
#include "backends/platform/sdl/win32/win32.h"
#include "backends/fs/windows/windows-fs-factory.h"