Mercurial > sdl-ios-xcode
diff src/SDL.c @ 3319:63d4517fc4ac
Fixed bug #777
Implemented SDL_GetPlatform()
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 26 Sep 2009 10:32:14 +0000 |
parents | a67a961e2171 |
children | c5925cd41955 |
line wrap: on
line diff
--- a/src/SDL.c Sat Sep 26 10:22:35 2009 +0000 +++ b/src/SDL.c Sat Sep 26 10:32:14 2009 +0000 @@ -277,6 +277,62 @@ return SDL_REVISION; } +/* Get the name of the platform */ +const char * +SDL_GetPlatform() +{ +#if __AIX__ + return "AIX"; +#elif __HAIKU__ +/* Haiku must appear here before BeOS, since it also defines __BEOS__ */ + return "Haiku"; +#elif __BEOS__ + return "BeOS"; +#elif __BSDI__ + return "BSDI"; +#elif __DREAMCAST__ + return "Dreamcast"; +#elif __FREEBSD__ + return "FreeBSD"; +#elif __HPUX__ + return "HP-UX"; +#elif __IRIX__ + return "Irix"; +#elif __LINUX__ + return "Linux"; +#elif __MINT__ + return "Atari MiNT"; +#elif __MACOS__ + return "MacOS Classic"; +#elif __MACOSX__ + return "Mac OS X"; +#elif __NETBSD__ + return "NetBSD"; +#elif __OPENBSD__ + return "OpenBSD"; +#elif __OS2__ + return "OS/2"; +#elif __OSF__ + return "OSF/1"; +#elif __QNXNTO__ + return "QNX Neutrino"; +#elif __RISCOS__ + return "RISC OS"; +#elif __SOLARIS__ + return "Solaris"; +#elif __WIN32__ +#ifdef _WIN32_WCE + return "Windows CE"; +#else + return "Windows"; +#endif +#elif __IPHONEOS__ + return "iPhone OS"; +#else + return "Unknown (see SDL_platform.h)"; +#endif +} + #if defined(__WIN32__) #if !defined(HAVE_LIBC) || (defined(__WATCOMC__) && defined(BUILD_DLL))