Commit 2072cdd8 authored by Sam Lantinga's avatar Sam Lantinga

Make sure code is only compiled if the appropriate subsystem is enabled

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401642
parent a5e03023
......@@ -214,6 +214,7 @@
#undef SDL_LOADSO_BEOS
#undef SDL_LOADSO_DLCOMPAT
#undef SDL_LOADSO_DLOPEN
#undef SDL_LOADSO_DUMMY
#undef SDL_LOADSO_LDG
#undef SDL_LOADSO_MACOS
#undef SDL_LOADSO_OS2
......@@ -236,6 +237,7 @@
#undef SDL_TIMER_AMIGA
#undef SDL_TIMER_BEOS
#undef SDL_TIMER_DC
#undef SDL_TIMER_DUMMY
#undef SDL_TIMER_EPOC
#undef SDL_TIMER_MACOS
#undef SDL_TIMER_MINT
......
......@@ -23,6 +23,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_CDROM_AIX
/* Functions for system-level CD-ROM audio control */
/*#define DEBUG_CDROM 1*/
......@@ -655,3 +657,4 @@ void SDL_SYS_CDQuit(void)
}
}
#endif /* SDL_CDROM_AIX */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_CDROM_BEOS
/* Functions for system-level CD-ROM audio control on BeOS
(not completely implemented yet)
*/
......@@ -407,3 +409,4 @@ void SDL_SYS_CDQuit(void)
}
}
#endif /* SDL_CDROM_BEOS */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_CDROM_BSDI
/*
* Functions for system-level CD-ROM audio control for BSD/OS 4.x
* This started life out as a copy of the freebsd/SDL_cdrom.c file but was
......@@ -536,3 +538,5 @@ void SDL_SYS_CDQuit(void)
}
SDL_numcds = 0;
}
#endif /* SDL_CDROM_BSDI */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_CDROM_DC
/* Functions for system-level CD-ROM audio control */
#include <dc/cdrom.h>
......@@ -161,3 +163,5 @@ void SDL_SYS_CDQuit(void)
{
}
#endif /* SDL_CDROM_DC */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#if defined(SDL_CDROM_DUMMY) || defined(SDL_CDROM_DISABLED)
/* Stub functions for system-level CD-ROM audio control */
#include "SDL_cdrom.h"
......@@ -36,3 +38,4 @@ void SDL_SYS_CDQuit(void)
return;
}
#endif /* SDL_CDROM_DUMMY || SDL_CDROM_DISABLED */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_CDROM_FREEBSD
/* Functions for system-level CD-ROM audio control */
#include <sys/types.h>
......@@ -401,3 +403,4 @@ void SDL_SYS_CDQuit(void)
}
}
#endif /* SDL_CDROM_FREEBSD */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_CDROM_LINUX
/* Functions for system-level CD-ROM audio control */
#include <string.h> /* For strerror() */
......@@ -559,3 +561,4 @@ void SDL_SYS_CDQuit(void)
}
}
#endif /* SDL_CDROM_LINUX */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_CDROM_MACOS
/* MacOS functions for system-level CD-ROM audio control */
#include <Devices.h>
......@@ -520,3 +522,4 @@ void SDL_SYS_CDQuit(void)
SDL_memset(SDL_cdlist + SDL_numcds, 0, sizeof(SDL_cdlist[0]));
}
#endif /* SDL_CDROM_MACOS */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_CDROM_MACOSX
#include "SDL_syscdrom_c.h"
#pragma mark -- Globals --
......@@ -502,3 +504,4 @@ static void SDL_SYS_CDClose(SDL_CD *cdrom)
return;
}
#endif /* SDL_CDROM_MACOSX */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_CDROM_MINT
/*
Atari MetaDOS CD-ROM functions
......@@ -311,3 +313,5 @@ static int SDL_SYS_CDEject(SDL_CD *cdrom)
{
return SDL_SYS_CDioctl(cdrom->id, CDROMEJECT, 0);
}
#endif /* SDL_CDROM_MINT */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_CDROM_OPENBSD
/* Functions for system-level CD-ROM audio control */
#include <sys/types.h>
......@@ -410,3 +412,4 @@ void SDL_SYS_CDQuit(void)
}
}
#endif /* SDL_CDROM_OPENBSD */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_CDROM_OS2
/* Functions for system-level CD-ROM audio control */
#define INCL_MCIOS2
......@@ -388,3 +390,4 @@ if ( SDL_numcds > 0 )
}
}
#endif /* SDL_CDROM_OS2 */
......@@ -20,6 +20,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_CDROM_OSF
/* Functions for system-level CD-ROM audio control */
/* #define DEBUG_CDROM 1 */
......@@ -439,4 +441,4 @@ void SDL_SYS_CDQuit(void)
}
}
#endif /* SDL_CDROM_OSF */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_CDROM_QNX
/* Functions for system-level CD-ROM audio control */
#include <sys/types.h>
......@@ -545,3 +547,5 @@ void SDL_SYS_CDQuit(void)
SDL_numcds = 0;
}
}
#endif /* SDL_CDROM_QNX */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_CDROM_WIN32
/* Functions for system-level CD-ROM audio control */
#define WIN32_LEAN_AND_MEAN
......@@ -379,3 +381,5 @@ void SDL_SYS_CDQuit(void)
SDL_numcds = 0;
}
}
#endif /* SDL_CDROM_WIN32 */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_JOYSTICK_AMIGA
/* This is the system specific header for the SDL joystick API */
#include <libraries/lowlevel.h>
......@@ -225,7 +227,7 @@ void SDL_SYS_JoystickQuit(void)
LowLevelBase=NULL;
SDL_numjoysticks=0;
}
return;
}
#endif /* SDL_JOYSTICK_AMIGA */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_JOYSTICK_BEOS
/* This is the system specific header for the SDL joystick API */
#include <be/support/String.h>
......@@ -231,3 +233,5 @@ void SDL_SYS_JoystickQuit(void)
}
}; // extern "C"
#endif /* SDL_JOYSTICK_BEOS */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_JOYSTICK_USBHID
/*
* Joystick driver for the uhid(4) interface found in OpenBSD,
* NetBSD and FreeBSD.
......@@ -575,3 +577,4 @@ report_free(struct report *r)
r->status = SREPORT_UNINIT;
}
#endif /* SDL_JOYSTICK_USBHID */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_JOYSTICK_IOKIT
/* SDL joystick driver for Darwin / Mac OS X, based on the IOKit HID API */
/* Written 2001 by Max Horn */
......@@ -836,3 +838,5 @@ void SDL_SYS_JoystickQuit(void)
while (NULL != gpDeviceList)
gpDeviceList = HIDDisposeDevice (&gpDeviceList);
}
#endif /* SDL_JOYSTICK_IOKIT */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_JOYSTICK_DC
#include "SDL_events.h"
#include "SDL_joystick.h"
#include "../SDL_sysjoystick.h"
......@@ -187,3 +189,5 @@ void SDL_SYS_JoystickQuit(void)
{
return;
}
#endif /* SDL_JOYSTICK_DC */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#if defined(SDL_JOYSTICK_DUMMY) || defined(SDL_JOYSTICK_DISABLED)
/* This is the system specific header for the SDL joystick API */
#include "SDL_joystick.h"
......@@ -78,3 +80,4 @@ void SDL_SYS_JoystickQuit(void)
return;
}
#endif /* SDL_JOYSTICK_DUMMY || SDL_JOYSTICK_DISABLED */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_JOYSTICK_LINUX
/* This is the system specific header for the SDL joystick API */
#include <sys/stat.h>
......@@ -1195,3 +1197,4 @@ void SDL_SYS_JoystickQuit(void)
SDL_joylist[0].fname = NULL;
}
#endif /* SDL_JOYSTICK_LINUX */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_JOYSTICK_MACOS
/* SDL stuff -- "SDL_sysjoystick.c"
MacOS joystick functions by Frederick Reitberger
......@@ -315,3 +317,4 @@ void SDL_SYS_JoystickQuit(void)
ISpShutdown();
}
#endif /* SDL_JOYSTICK_MACOS */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_JOYSTICK_MINT
/*
* Atari Joystick/Joypad drivers
*
......@@ -627,3 +629,5 @@ static void UpdateJoypads(void)
JOYPAD_IO.directions=0xff7f;
jp_joypads[1] |= (((~(JOYPAD_IO.directions))>>12) & 15)<<12;
}
#endif /* SDL_JOYSTICK_MINT */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_JOYSTICK_OS2
/* OS/2 Joystick driver, contributed by Daniel Caetano */
#include <mem.h>
......@@ -663,4 +665,4 @@ if (*joyenv==stopchar)
return chcnt;
}
#endif /* SDL_JOYSTICK_OS2 */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_JOYSTICK_RISCOS
/*
RISC OS - Joystick support by Alan Buckley (alan_baa@hotmail.com) - 10 April 2003
......@@ -171,3 +173,4 @@ void SDL_SYS_JoystickQuit(void)
return;
}
#endif /* SDL_JOYSTICK_RISCOS */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_JOYSTICK_WINMM
/* Win32 MultiMedia Joystick driver, contributed by Andrei de A. Formiga */
#define WIN32_LEAN_AND_MEAN
......@@ -416,3 +418,5 @@ void SetMMerror(char *function, int code)
}
SDL_SetError("%s", errbuf);
}
#endif /* SDL_JOYSTICK_WINMM */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_LOADSO_BEOS
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* System dependent library loading routines */
......@@ -71,3 +73,4 @@ void SDL_UnloadObject(void *handle)
}
}
#endif /* SDL_LOADSO_BEOS */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_LOADSO_DLOPEN
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* System dependent library loading routines */
......@@ -63,3 +65,4 @@ void SDL_UnloadObject(void *handle)
}
}
#endif /* SDL_LOADSO_DLOPEN */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#if defined(SDL_LOADSO_DUMMY) || defined(SDL_LOADSO_DISABLED)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* System dependent library loading routines */
......@@ -45,3 +47,4 @@ void SDL_UnloadObject(void *handle)
/* no-op. */
}
#endif /* SDL_LOADSO_DUMMY || SDL_LOADSO_DISABLED */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_LOADSO_MACOS
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* System dependent library loading routines */
......@@ -101,3 +103,4 @@ void SDL_UnloadObject(void *handle)
}
}
#endif /* SDL_LOADSO_MACOS */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_LOADSO_DLCOMPAT
/* Please note that dlcompat apparently ships in current Mac OS X versions
* as a system library that provides compatibility with the Unix "dlopen"
* interface. In order to allow SDL to work on older OS X releases and also
......@@ -1399,3 +1401,4 @@ void SDL_UnloadObject(void *handle)
}
}
#endif /* SDL_LOADSO_DLCOMPAT */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_LOADSO_LDG
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* System dependent library loading routines */
......@@ -57,3 +59,4 @@ void SDL_UnloadObject(void *handle)
}
}
#endif /* SDL_LOADSO_LDG */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_LOADSO_OS2
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* System dependent library loading routines */
......@@ -66,3 +68,4 @@ void SDL_UnloadObject(void *handle)
DosFreeModule((HMODULE) handle);
}
#endif /* SDL_LOADSO_OS2 */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_LOADSO_WIN32
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* System dependent library loading routines */
......@@ -134,3 +136,4 @@ void SDL_UnloadObject(void *handle)
}
}
#endif /* SDL_LOADSO_WIN32 */
......@@ -19,6 +19,7 @@
Sam Lantinga
slouken@libsdl.org
*/
#include "SDL_config.h"
/*
SDL_sysmutex.cpp
......
......@@ -19,6 +19,7 @@
Sam Lantinga
slouken@libsdl.org
*/
#include "SDL_config.h"
/*
SDL_syssem.cpp
......
......@@ -19,6 +19,7 @@
Sam Lantinga
slouken@libsdl.org
*/
#include "SDL_config.h"
/*
SDL_systhread.cpp
......
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_TIMER_AMIGA
#include <stdio.h>
#include <time.h>
#include <signal.h>
......@@ -261,3 +263,5 @@ void SDL_SYS_StopTimer(void)
{
return;
}
#endif /* SDL_TIMER_AMIGA */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_TIMER_BEOS
#include <be/kernel/OS.h>
#include "SDL_thread.h"
......@@ -89,3 +91,5 @@ void SDL_SYS_StopTimer(void)
{
return;
}
#endif /* SDL_TIMER_BEOS */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_TIMER_DC
#include <kos.h>
#include "SDL_thread.h"
......@@ -94,3 +96,5 @@ void SDL_SYS_StopTimer(void)
{
return;
}
#endif /* SDL_TIMER_DC */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#if defined(SDL_TIMER_DUMMY) || defined(SDL_TIMERS_DISABLED)
#include "SDL_timer.h"
#include "../SDL_timer_c.h"
......@@ -85,3 +87,5 @@ void SDL_SYS_StopTimer(void)
{
return;
}
#endif /* SDL_TIMER_DUMMY || SDL_TIMERS_DISABLED */
......@@ -19,6 +19,9 @@
Sam Lantinga
slouken@libsdl.org
*/
#include "SDL_config.h"
#ifdef SDL_TIMER_EPOC
/*
SDL_systimer.cpp
......@@ -109,3 +112,5 @@ void SDL_SYS_StopTimer(void)
}
}; // extern "C"
#endif /* SDL_TIMER_EPOC */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_TIMER_MACOS
#include <Types.h>
#include <Timer.h>
#include <OSUtils.h>
......@@ -146,3 +148,5 @@ void SDL_SYS_StopTimer(void)
{
RmvTime((QElemPtr)&gExtendedTimerRec.tmTask);
}
#endif /* SDL_TIMER_MACOS */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_TIMER_MACOS
#include <Types.h>
#include <Timer.h>
#include <OSUtils.h>
......@@ -172,3 +174,5 @@ void SDL_SYS_StopTimer(void)
{
RmvTime((QElemPtr)&gExtendedTimerRec.tmTask);
}
#endif /* SDL_TIMER_MACOS */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_TIMER_MINT
/*
* TOS/MiNT timer driver
* based on vbl vector
......@@ -151,3 +153,5 @@ void SDL_SYS_StopTimer(void)
{
return;
}
#endif /* SDL_TIMER_MINT */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_TIMER_OS2
#define INCL_DOSMISC
#define INCL_DOSERRORS
#define INCL_DOSSEMAPHORES
......@@ -222,4 +224,4 @@ void SDL_SYS_StopTimer(void)
return;
}
#endif /* SDL_TIMER_OS2 */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_TIMER_RISCOS
#include <stdio.h>
#include <time.h>
#include <sys/time.h>
......@@ -227,3 +229,5 @@ void SDL_SYS_StopTimer(void)
}
#endif /* SDL_THREADS_DISABLED */
#endif /* SDL_TIMER_RISCOS */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_TIMER_UNIX
#include <stdio.h>
#include <sys/time.h>
#include <signal.h>
......@@ -234,3 +236,5 @@ void SDL_SYS_StopTimer(void)
}
#endif /* USE_ITIMER */
#endif /* SDL_TIMER_UNIX */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_TIMER_WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <mmsystem.h>
......@@ -155,3 +157,4 @@ void SDL_SYS_StopTimer(void)
return;
}
#endif /* SDL_TIMER_WIN32 */
......@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_TIMER_WINCE
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <mmsystem.h>
......@@ -192,3 +194,5 @@ void SDL_SYS_StopTimer(void)
{
return;
}
#endif /* SDL_TIMER_WINCE */
......@@ -19,6 +19,7 @@
Sam Lantinga
slouken@libsdl.org
*/
#include "SDL_config.h"
/*
SDL_epocevents.cpp
......
......@@ -19,6 +19,7 @@
Sam Lantinga
slouken@libsdl.org
*/
#include "SDL_config.h"
/*
SDL_epocvideo.cpp
......@@ -27,8 +28,6 @@
Epoc version by Hannu Viitala (hannu.j.viitala@mbnet.fi)
*/
extern "C" {
#include "SDL_timer.h"
#include "SDL_video.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment