src/SDL.c
changeset 3319 63d4517fc4ac
parent 3269 a67a961e2171
child 3647 c5925cd41955
     1.1 --- a/src/SDL.c	Sat Sep 26 10:22:35 2009 +0000
     1.2 +++ b/src/SDL.c	Sat Sep 26 10:32:14 2009 +0000
     1.3 @@ -277,6 +277,62 @@
     1.4      return SDL_REVISION;
     1.5  }
     1.6  
     1.7 +/* Get the name of the platform */
     1.8 +const char *
     1.9 +SDL_GetPlatform()
    1.10 +{
    1.11 +#if __AIX__
    1.12 +    return "AIX";
    1.13 +#elif __HAIKU__
    1.14 +/* Haiku must appear here before BeOS, since it also defines __BEOS__ */
    1.15 +    return "Haiku";
    1.16 +#elif __BEOS__
    1.17 +    return "BeOS";
    1.18 +#elif __BSDI__
    1.19 +    return "BSDI";
    1.20 +#elif __DREAMCAST__
    1.21 +    return "Dreamcast";
    1.22 +#elif __FREEBSD__
    1.23 +    return "FreeBSD";
    1.24 +#elif __HPUX__
    1.25 +    return "HP-UX";
    1.26 +#elif __IRIX__
    1.27 +    return "Irix";
    1.28 +#elif __LINUX__
    1.29 +    return "Linux";
    1.30 +#elif __MINT__
    1.31 +    return "Atari MiNT";
    1.32 +#elif __MACOS__
    1.33 +    return "MacOS Classic";
    1.34 +#elif __MACOSX__
    1.35 +    return "Mac OS X";
    1.36 +#elif __NETBSD__
    1.37 +    return "NetBSD";
    1.38 +#elif __OPENBSD__
    1.39 +    return "OpenBSD";
    1.40 +#elif __OS2__
    1.41 +    return "OS/2";
    1.42 +#elif __OSF__
    1.43 +    return "OSF/1";
    1.44 +#elif __QNXNTO__
    1.45 +    return "QNX Neutrino";
    1.46 +#elif __RISCOS__
    1.47 +    return "RISC OS";
    1.48 +#elif __SOLARIS__
    1.49 +    return "Solaris";
    1.50 +#elif __WIN32__
    1.51 +#ifdef _WIN32_WCE
    1.52 +    return "Windows CE";
    1.53 +#else
    1.54 +    return "Windows";
    1.55 +#endif
    1.56 +#elif __IPHONEOS__
    1.57 +    return "iPhone OS";
    1.58 +#else
    1.59 +    return "Unknown (see SDL_platform.h)";
    1.60 +#endif
    1.61 +}
    1.62 +
    1.63  #if defined(__WIN32__)
    1.64  
    1.65  #if !defined(HAVE_LIBC) || (defined(__WATCOMC__) && defined(BUILD_DLL))