diff --git a/version.cc b/version.cc index 9ac9e7d9..4af022f8 100644 --- a/version.cc +++ b/version.cc @@ -20,6 +20,7 @@ # include #endif +#include #include #ifdef _WIN32 @@ -152,12 +153,10 @@ void getVersionInfo(std::ostream &out) { /* * 5. Platform */ - + const char* sdlPlatform = SDL_GetPlatform(); out << std::endl << "Platform: "; -#if (defined(ANDROID)) - out << "Android"; -#elif (defined(__linux__) || defined(__linux) || defined(linux)) +#if (defined(__linux__) || defined(__linux) || defined(linux)) std::string ver; try { @@ -173,8 +172,6 @@ void getVersionInfo(std::ostream &out) { ver = "Linux"; } out << ver; -#elif (defined(__sun__) || defined(__sun)) - out << "Solaris"; #elif (defined(_WIN32)) out << "Windows "; { @@ -212,15 +209,8 @@ void getVersionInfo(std::ostream &out) { out << " Version " << info.dwMajorVersion << "." << info.dwMinorVersion << " Build " << LOWORD(info.dwBuildNumber & 0xFFFF); } -#elif (defined(MACOSX)) - out << "Mac OS X"; -#elif (defined(__IPHONEOS__)) - out << "iOS"; -#elif (defined(NETBSD)) - out << "NetBSD"; #else - out << "Unknown"; + out << sdlPlatform; #endif - out << std::endl; }