summaryrefslogtreecommitdiff
path: root/src/joystick
diff options
context:
space:
mode:
authorSam Lantinga <slouken@libsdl.org>2006-04-14 04:46:47 +0000
committerSam Lantinga <slouken@libsdl.org>2006-04-14 04:46:47 +0000
commit2072cdd8572c2a0e747e5e986467d6215143ed52 (patch)
treefd1f7f03c6b5b3c8b0880eeae60f2b3d74f5a359 /src/joystick
parenta5e03023d5be6b487aabf4a35232b9f7591d8634 (diff)
Make sure code is only compiled if the appropriate subsystem is enabled
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401642
Diffstat (limited to 'src/joystick')
-rw-r--r--src/joystick/amigaos/SDL_sysjoystick.c4
-rw-r--r--src/joystick/beos/SDL_bejoystick.cc4
-rw-r--r--src/joystick/bsd/SDL_sysjoystick.c3
-rw-r--r--src/joystick/darwin/SDL_sysjoystick.c4
-rw-r--r--src/joystick/dc/SDL_sysjoystick.c4
-rw-r--r--src/joystick/dummy/SDL_sysjoystick.c3
-rw-r--r--src/joystick/linux/SDL_sysjoystick.c3
-rw-r--r--src/joystick/macos/SDL_sysjoystick.c3
-rw-r--r--src/joystick/mint/SDL_sysjoystick.c4
-rw-r--r--src/joystick/os2/SDL_sysjoystick.c4
-rw-r--r--src/joystick/riscos/SDL_sysjoystick.c3
-rw-r--r--src/joystick/win32/SDL_mmjoystick.c4
12 files changed, 41 insertions, 2 deletions
diff --git a/src/joystick/amigaos/SDL_sysjoystick.c b/src/joystick/amigaos/SDL_sysjoystick.c
index 7e59f9d3..35e4ebe4 100644
--- a/src/joystick/amigaos/SDL_sysjoystick.c
+++ b/src/joystick/amigaos/SDL_sysjoystick.c
@@ -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 */
diff --git a/src/joystick/beos/SDL_bejoystick.cc b/src/joystick/beos/SDL_bejoystick.cc
index 5a020a64..7c52b866 100644
--- a/src/joystick/beos/SDL_bejoystick.cc
+++ b/src/joystick/beos/SDL_bejoystick.cc
@@ -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 */
diff --git a/src/joystick/bsd/SDL_sysjoystick.c b/src/joystick/bsd/SDL_sysjoystick.c
index 3846c01d..0c7043ac 100644
--- a/src/joystick/bsd/SDL_sysjoystick.c
+++ b/src/joystick/bsd/SDL_sysjoystick.c
@@ -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 */
diff --git a/src/joystick/darwin/SDL_sysjoystick.c b/src/joystick/darwin/SDL_sysjoystick.c
index 46e78673..022c992d 100644
--- a/src/joystick/darwin/SDL_sysjoystick.c
+++ b/src/joystick/darwin/SDL_sysjoystick.c
@@ -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 */
diff --git a/src/joystick/dc/SDL_sysjoystick.c b/src/joystick/dc/SDL_sysjoystick.c
index eb92f762..ac724733 100644
--- a/src/joystick/dc/SDL_sysjoystick.c
+++ b/src/joystick/dc/SDL_sysjoystick.c
@@ -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 */
diff --git a/src/joystick/dummy/SDL_sysjoystick.c b/src/joystick/dummy/SDL_sysjoystick.c
index 6994ef95..f3209a2c 100644
--- a/src/joystick/dummy/SDL_sysjoystick.c
+++ b/src/joystick/dummy/SDL_sysjoystick.c
@@ -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 */
diff --git a/src/joystick/linux/SDL_sysjoystick.c b/src/joystick/linux/SDL_sysjoystick.c
index 065f5018..3d40b497 100644
--- a/src/joystick/linux/SDL_sysjoystick.c
+++ b/src/joystick/linux/SDL_sysjoystick.c
@@ -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 */
diff --git a/src/joystick/macos/SDL_sysjoystick.c b/src/joystick/macos/SDL_sysjoystick.c
index 40b4e6f5..25609b30 100644
--- a/src/joystick/macos/SDL_sysjoystick.c
+++ b/src/joystick/macos/SDL_sysjoystick.c
@@ -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 */
diff --git a/src/joystick/mint/SDL_sysjoystick.c b/src/joystick/mint/SDL_sysjoystick.c
index ab52ce2b..0a129fe8 100644
--- a/src/joystick/mint/SDL_sysjoystick.c
+++ b/src/joystick/mint/SDL_sysjoystick.c
@@ -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 */
diff --git a/src/joystick/os2/SDL_sysjoystick.c b/src/joystick/os2/SDL_sysjoystick.c
index c49be5c8..15dca4eb 100644
--- a/src/joystick/os2/SDL_sysjoystick.c
+++ b/src/joystick/os2/SDL_sysjoystick.c
@@ -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 */
diff --git a/src/joystick/riscos/SDL_sysjoystick.c b/src/joystick/riscos/SDL_sysjoystick.c
index 4fe7c451..ed8ac91c 100644
--- a/src/joystick/riscos/SDL_sysjoystick.c
+++ b/src/joystick/riscos/SDL_sysjoystick.c
@@ -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 */
diff --git a/src/joystick/win32/SDL_mmjoystick.c b/src/joystick/win32/SDL_mmjoystick.c
index 38a8c710..29565514 100644
--- a/src/joystick/win32/SDL_mmjoystick.c
+++ b/src/joystick/win32/SDL_mmjoystick.c
@@ -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 */