SDL: Move #include <SDL.h> into a special wrapper file
svn-id: r54572
This commit is contained in:
parent
69c2fc5ceb
commit
4e0e406181
20 changed files with 69 additions and 80 deletions
|
@ -28,11 +28,7 @@
|
||||||
|
|
||||||
#include "backends/audiocd/default/default-audiocd.h"
|
#include "backends/audiocd/default/default-audiocd.h"
|
||||||
|
|
||||||
#if defined(__SYMBIAN32__)
|
#include "backends/platform/sdl/sdl-sys.h"
|
||||||
#include <esdl\SDL.h>
|
|
||||||
#else
|
|
||||||
#include <SDL.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The SDL audio cd manager. Implements real audio cd playback.
|
* The SDL audio cd manager. Implements real audio cd playback.
|
||||||
|
|
|
@ -28,11 +28,8 @@
|
||||||
|
|
||||||
#include "backends/events/default/default-events.h"
|
#include "backends/events/default/default-events.h"
|
||||||
|
|
||||||
#if defined(__SYMBIAN32__)
|
#include "backends/platform/sdl/sdl-sys.h"
|
||||||
#include <esdl\SDL.h>
|
|
||||||
#else
|
|
||||||
#include <SDL.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The SDL event source.
|
* The SDL event source.
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#ifndef BACKENDS_GRAPHICS_OPENGLSDL_H
|
#ifndef BACKENDS_GRAPHICS_OPENGLSDL_H
|
||||||
#define BACKENDS_GRAPHICS_OPENGLSDL_H
|
#define BACKENDS_GRAPHICS_OPENGLSDL_H
|
||||||
|
|
||||||
#include <SDL.h>
|
#include "backends/platform/sdl/sdl-sys.h"
|
||||||
#if defined(ARRAYSIZE) && !defined(_WINDOWS_)
|
#if defined(ARRAYSIZE) && !defined(_WINDOWS_)
|
||||||
#undef ARRAYSIZE
|
#undef ARRAYSIZE
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -25,9 +25,6 @@
|
||||||
|
|
||||||
#if defined(SDL_BACKEND)
|
#if defined(SDL_BACKEND)
|
||||||
|
|
||||||
// Disable symbol overrides so that we can use system headers.
|
|
||||||
#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
|
|
||||||
|
|
||||||
#include "backends/graphics/sdl/sdl-graphics.h"
|
#include "backends/graphics/sdl/sdl-graphics.h"
|
||||||
#include "backends/events/sdl/sdl-events.h"
|
#include "backends/events/sdl/sdl-events.h"
|
||||||
#include "backends/platform/sdl/sdl.h"
|
#include "backends/platform/sdl/sdl.h"
|
||||||
|
|
|
@ -33,11 +33,8 @@
|
||||||
|
|
||||||
#include "backends/events/sdl/sdl-events.h"
|
#include "backends/events/sdl/sdl-events.h"
|
||||||
|
|
||||||
#if defined(__SYMBIAN32__)
|
#include "backends/platform/sdl/sdl-sys.h"
|
||||||
#include <esdl\SDL.h>
|
|
||||||
#else
|
|
||||||
#include <SDL.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
|
#if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
|
||||||
// Uncomment this to enable the 'on screen display' code.
|
// Uncomment this to enable the 'on screen display' code.
|
||||||
|
|
|
@ -26,12 +26,7 @@
|
||||||
#ifndef BACKENDS_MIXER_SDL_H
|
#ifndef BACKENDS_MIXER_SDL_H
|
||||||
#define BACKENDS_MIXER_SDL_H
|
#define BACKENDS_MIXER_SDL_H
|
||||||
|
|
||||||
#if defined(__SYMBIAN32__)
|
#include "backends/platform/sdl/sdl-sys.h"
|
||||||
#include <esdl\SDL.h>
|
|
||||||
#else
|
|
||||||
#include <SDL.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "sound/mixer_intern.h"
|
#include "sound/mixer_intern.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -25,16 +25,9 @@
|
||||||
|
|
||||||
#if defined(SDL_BACKEND)
|
#if defined(SDL_BACKEND)
|
||||||
|
|
||||||
// Disable symbol overrides so that we can use system headers.
|
|
||||||
#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
|
|
||||||
|
|
||||||
#include "backends/mutex/sdl/sdl-mutex.h"
|
#include "backends/mutex/sdl/sdl-mutex.h"
|
||||||
|
#include "backends/platform/sdl/sdl-sys.h"
|
||||||
|
|
||||||
#if defined(__SYMBIAN32__)
|
|
||||||
#include <esdl\SDL.h>
|
|
||||||
#else
|
|
||||||
#include <SDL.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
OSystem::MutexRef SdlMutexManager::createMutex() {
|
OSystem::MutexRef SdlMutexManager::createMutex() {
|
||||||
return (OSystem::MutexRef) SDL_CreateMutex();
|
return (OSystem::MutexRef) SDL_CreateMutex();
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
|
|
||||||
#if defined(DINGUX)
|
#if defined(DINGUX)
|
||||||
|
|
||||||
#include <SDL.h>
|
|
||||||
#include "backends/base-backend.h"
|
#include "backends/base-backend.h"
|
||||||
#include "backends/platform/sdl/sdl.h"
|
#include "backends/platform/sdl/sdl.h"
|
||||||
#include "backends/platform/sdl/posix/posix.h"
|
#include "backends/platform/sdl/posix/posix.h"
|
||||||
|
|
|
@ -23,11 +23,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Disable symbol overrides so that we can use system headers.
|
#include "backends/platform/sdl/sdl-sys.h"
|
||||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL
|
|
||||||
|
|
||||||
#include "common/scummsys.h"
|
|
||||||
#include <SDL/SDL.h>
|
|
||||||
|
|
||||||
// #include "backends/platform/gph/gph-options.h"
|
// #include "backends/platform/gph/gph-options.h"
|
||||||
#include "backends/platform/gph/gph-sdl.h"
|
#include "backends/platform/gph/gph-sdl.h"
|
||||||
|
|
|
@ -26,8 +26,7 @@
|
||||||
// Disable symbol overrides so that we can use system headers.
|
// Disable symbol overrides so that we can use system headers.
|
||||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL
|
#define FORBIDDEN_SYMBOL_ALLOW_ALL
|
||||||
|
|
||||||
#include "common/scummsys.h"
|
#include "backends/platform/sdl/sdl-sys.h"
|
||||||
#include <SDL/SDL.h>
|
|
||||||
|
|
||||||
#include "backends/platform/openpandora/op-sdl.h"
|
#include "backends/platform/openpandora/op-sdl.h"
|
||||||
#include "backends/plugins/posix/posix-provider.h"
|
#include "backends/plugins/posix/posix-provider.h"
|
||||||
|
|
50
backends/platform/sdl/sdl-sys.h
Normal file
50
backends/platform/sdl/sdl-sys.h
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
/* ScummVM - Graphic Adventure Engine
|
||||||
|
*
|
||||||
|
* ScummVM is the legal property of its developers, whose names
|
||||||
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||||
|
* file distributed with this source distribution.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*
|
||||||
|
* $URL$
|
||||||
|
* $Id$
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#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
|
||||||
|
|
||||||
|
#include "common/scummsys.h"
|
||||||
|
|
||||||
|
// Remove FILE override from common/forbidden.h, and replace
|
||||||
|
// it with an alternate slightly less unfriendly override.
|
||||||
|
#undef FILE
|
||||||
|
typedef struct { int FAKE; } FAKE_FILE;
|
||||||
|
#define FILE FAKE_FILE
|
||||||
|
|
||||||
|
#if defined(__SYMBIAN32__)
|
||||||
|
#include <esdl\SDL.h>
|
||||||
|
#else
|
||||||
|
#include <SDL.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Finally forbid FILE again
|
||||||
|
#undef FILE
|
||||||
|
#define FILE FORBIDDEN_SYMBOL_REPLACEMENT
|
||||||
|
|
||||||
|
#endif
|
|
@ -26,11 +26,7 @@
|
||||||
#ifndef PLATFORM_SDL_H
|
#ifndef PLATFORM_SDL_H
|
||||||
#define PLATFORM_SDL_H
|
#define PLATFORM_SDL_H
|
||||||
|
|
||||||
#if defined(__SYMBIAN32__)
|
#include "backends/platform/sdl/sdl-sys.h"
|
||||||
#include <esdl\SDL.h>
|
|
||||||
#else
|
|
||||||
#include <SDL.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "backends/modular-backend.h"
|
#include "backends/modular-backend.h"
|
||||||
#include "backends/mixer/sdl/sdl-mixer.h"
|
#include "backends/mixer/sdl/sdl-mixer.h"
|
||||||
|
|
|
@ -23,12 +23,9 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Disable symbol overrides so that we can use system headers.
|
|
||||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL
|
|
||||||
|
|
||||||
#include "CEDevice.h"
|
#include "CEDevice.h"
|
||||||
|
|
||||||
#include <SDL.h>
|
#include "backends/platform/sdl/sdl-sys.h"
|
||||||
|
|
||||||
#include "backends/platform/wince/wince-sdl.h"
|
#include "backends/platform/wince/wince-sdl.h"
|
||||||
|
|
||||||
|
|
|
@ -23,10 +23,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Disable symbol overrides so that we can use system headers.
|
#include "backends/platform/sdl/sdl-sys.h"
|
||||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL
|
|
||||||
|
|
||||||
#include <SDL.h>
|
|
||||||
|
|
||||||
#include "Toolbar.h"
|
#include "Toolbar.h"
|
||||||
|
|
||||||
|
|
|
@ -23,11 +23,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Disable symbol overrides so that we can use system headers.
|
#include "backends/platform/sdl/sdl-sys.h"
|
||||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL
|
|
||||||
|
|
||||||
#include <SDL.h>
|
|
||||||
|
|
||||||
#include "PanelKeyboard.h"
|
#include "PanelKeyboard.h"
|
||||||
|
|
||||||
namespace CEGUI {
|
namespace CEGUI {
|
||||||
|
|
|
@ -23,10 +23,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Disable symbol overrides so that we can use system headers.
|
#include "backends/platform/sdl/sdl-sys.h"
|
||||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL
|
|
||||||
|
|
||||||
#include "SDL.h"
|
|
||||||
#include "SDL_ImageResource.h"
|
#include "SDL_ImageResource.h"
|
||||||
|
|
||||||
namespace CEGUI {
|
namespace CEGUI {
|
||||||
|
|
|
@ -23,11 +23,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Disable symbol overrides so that we can use system headers.
|
#include "backends/platform/sdl/sdl-sys.h"
|
||||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL
|
|
||||||
|
|
||||||
#include <SDL.h>
|
|
||||||
|
|
||||||
#include "ToolbarHandler.h"
|
#include "ToolbarHandler.h"
|
||||||
|
|
||||||
namespace CEGUI {
|
namespace CEGUI {
|
||||||
|
|
|
@ -23,10 +23,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Disable symbol overrides so that we can use system headers.
|
#include "backends/platform/sdl/sdl-sys.h"
|
||||||
#define FORBIDDEN_SYMBOL_ALLOW_ALL
|
|
||||||
|
|
||||||
#include <SDL.h>
|
|
||||||
|
|
||||||
#include "EventsBuffer.h"
|
#include "EventsBuffer.h"
|
||||||
|
|
||||||
|
|
|
@ -32,9 +32,7 @@
|
||||||
#include "backends/plugins/dynamic-plugin.h"
|
#include "backends/plugins/dynamic-plugin.h"
|
||||||
#include "common/fs.h"
|
#include "common/fs.h"
|
||||||
|
|
||||||
#include "SDL.h"
|
#include "backends/platform/sdl/sdl-sys.h"
|
||||||
#include "SDL_loadso.h"
|
|
||||||
|
|
||||||
|
|
||||||
class SDLPlugin : public DynamicPlugin {
|
class SDLPlugin : public DynamicPlugin {
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -28,11 +28,7 @@
|
||||||
|
|
||||||
#include "backends/timer/default/default-timer.h"
|
#include "backends/timer/default/default-timer.h"
|
||||||
|
|
||||||
#if defined(__SYMBIAN32__)
|
#include "backends/platform/sdl/sdl-sys.h"
|
||||||
#include <esdl\SDL.h>
|
|
||||||
#else
|
|
||||||
#include <SDL.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SDL timer manager. Setups the timer callback for
|
* SDL timer manager. Setups the timer callback for
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue