Advertisement
dominus

Untitled

Sep 4th, 2022
1,661
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.24 KB | None | 0 0
  1. diff --git a/version.cc b/version.cc
  2. index 9ac9e7d9..4af022f8 100644
  3. --- a/version.cc
  4. +++ b/version.cc
  5. @@ -20,6 +20,7 @@
  6.  #  include <config.h>
  7.  #endif
  8.  
  9. +#include <SDL.h>
  10.  #include <iostream>
  11.  
  12.  #ifdef _WIN32
  13. @@ -152,12 +153,10 @@ void getVersionInfo(std::ostream &out) {
  14.     /*
  15.      * 5. Platform
  16.      */
  17. -
  18. +   const char* sdlPlatform = SDL_GetPlatform();
  19.     out << std::endl << "Platform: ";
  20.  
  21. -#if (defined(ANDROID))
  22. -   out << "Android";
  23. -#elif (defined(__linux__) || defined(__linux) || defined(linux))
  24. +#if (defined(__linux__) || defined(__linux) || defined(linux))
  25.     std::string ver;
  26.  
  27.     try {
  28. @@ -173,8 +172,6 @@ void getVersionInfo(std::ostream &out) {
  29.         ver = "Linux";
  30.     }
  31.     out << ver;
  32. -#elif (defined(__sun__) || defined(__sun))
  33. -   out << "Solaris";
  34.  #elif (defined(_WIN32))
  35.     out << "Windows ";
  36.     {
  37. @@ -212,15 +209,8 @@ void getVersionInfo(std::ostream &out) {
  38.  
  39.         out << " Version " << info.dwMajorVersion << "." << info.dwMinorVersion << " Build " << LOWORD(info.dwBuildNumber & 0xFFFF);
  40.     }
  41. -#elif (defined(MACOSX))
  42. -   out << "Mac OS X";
  43. -#elif (defined(__IPHONEOS__))
  44. -   out << "iOS";
  45. -#elif (defined(NETBSD))
  46. -   out << "NetBSD";
  47.  #else
  48. -   out << "Unknown";
  49. +   out << sdlPlatform;
  50.  #endif
  51. -
  52.     out << std::endl;
  53.  }
  54.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement