summaryrefslogtreecommitdiff
path: root/macosx/plugins/DFInput/SDL/include/SDL_platform.h
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-07-31 12:31:11 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-07-31 12:31:11 +0000
commit8bca7a2d9797c2b0546895f5e62fc05b38183468 (patch)
tree19e6bad8d1c3eabaaa7e34fe425a702ef7eb1e2b /macosx/plugins/DFInput/SDL/include/SDL_platform.h
parentdd4c0b039bcd38459cd5545d087c2b047198067b (diff)
downloadpcsxr-8bca7a2d9797c2b0546895f5e62fc05b38183468.tar.gz
dfinput (macosx): upgraded to SDL 1.3 Beta.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@55318 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins/DFInput/SDL/include/SDL_platform.h')
-rw-r--r--macosx/plugins/DFInput/SDL/include/SDL_platform.h69
1 files changed, 60 insertions, 9 deletions
diff --git a/macosx/plugins/DFInput/SDL/include/SDL_platform.h b/macosx/plugins/DFInput/SDL/include/SDL_platform.h
index 5c71dcbf..f9429bde 100644
--- a/macosx/plugins/DFInput/SDL/include/SDL_platform.h
+++ b/macosx/plugins/DFInput/SDL/include/SDL_platform.h
@@ -1,6 +1,6 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2006 Sam Lantinga
+ Copyright (C) 1997-2010 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -20,10 +20,11 @@
slouken@libsdl.org
*/
-// 7-25-2010 Wei Mingzhi
-// Removed everything unrelated to Mac OS X Joystick support.
-
-/* Try to get a standard set of platform defines */
+/**
+ * \file SDL_platform.h
+ *
+ * Try to get a standard set of platform defines.
+ */
#ifndef _SDL_platform_h
#define _SDL_platform_h
@@ -36,6 +37,10 @@
#undef __BEOS__
#define __BEOS__ 1
#endif
+#if defined(__HAIKU__)
+#undef __HAIKU__
+#define __HAIKU__ 1
+#endif
#if defined(bsdi) || defined(__bsdi) || defined(__bsdi__)
#undef __BSDI__
#define __BSDI__ 1
@@ -44,7 +49,7 @@
#undef __DREAMCAST__
#define __DREAMCAST__ 1
#endif
-#if defined(__FreeBSD__) || defined(__DragonFly__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
#undef __FREEBSD__
#define __FREEBSD__ 1
#endif
@@ -60,13 +65,30 @@
#undef __LINUX__
#define __LINUX__ 1
#endif
+
#if defined(__APPLE__)
+/* lets us know what version of Mac OS X we're compiling on */
+#include "AvailabilityMacros.h"
+#ifdef MAC_OS_X_VERSION_10_3
+#include "TargetConditionals.h" /* this header is in 10.3 or later */
+#if TARGET_OS_IPHONE
+/* if compiling for iPhone */
+#undef __IPHONEOS__
+#define __IPHONEOS__ 1
+#undef __MACOSX__
+#else
+/* if not compiling for iPhone */
+#undef __MACOSX__
+#define __MACOSX__ 1
+#endif /* TARGET_OS_IPHONE */
+#else
+/* if earlier verion of Mac OS X than version 10.3 */
#undef __MACOSX__
#define __MACOSX__ 1
-#elif defined(macintosh)
-#undef __MACOS__
-#define __MACOS__ 1
#endif
+
+#endif /* defined(__APPLE__) */
+
#if defined(__NetBSD__)
#undef __NETBSD__
#define __NETBSD__ 1
@@ -100,4 +122,33 @@
#define __WIN32__ 1
#endif
+#if defined(__NDS__)
+#undef __NINTENDODS__
+#define __NINTENDODS__ 1
+#endif
+
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+/* *INDENT-OFF* */
+extern "C" {
+/* *INDENT-ON* */
+#endif
+
+/**
+ * \brief Gets the name of the platform.
+ */
+extern DECLSPEC const char * SDLCALL SDL_GetPlatform (void);
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+/* *INDENT-OFF* */
+}
+/* *INDENT-ON* */
+#endif
+#include "close_code.h"
+
#endif /* _SDL_platform_h */
+
+/* vi: set ts=4 sw=4 expandtab: */