RedefinePlatforms.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. // DO NOT PUT #pragma once or include guard check here
  2. // This header is designed to be able to be included multiple times
  3. // This header is used to redefine platforms after they were temporary undefined by UndefinePlatforms.h
  4. // Please make sure to always use this paired with the UndefinePlatforms.h header.
  5. //
  6. // ex.
  7. //
  8. // #include "UndefinePlatforms.h"
  9. // #include "Some3rdParty.h"
  10. // #include "RedefinePlatforms.h"
  11. #ifndef DETAIL__PLATFORMS_HAD_BEEN_UNDEFINED_BY_UNDEFINEPLATFORMS_H
  12. #error "DefinePlatforms.h can only be used after UndefinePlatforms.h got included before."
  13. #endif
  14. #undef DETAIL__PLATFORMS_HAD_BEEN_UNDEFINED_BY_UNDEFINEPLATFORMS_H
  15. // define all other platforms to 0
  16. #undef PLATFORM_WIN
  17. #if defined(DETAIL__TEMP_PLATFORM_WIN_WAS_1)
  18. #undef DETAIL__TEMP_PLATFORM_WIN_WAS_1
  19. #define PLATFORM_WIN 1
  20. #else
  21. #define PLATFORM_WIN 0
  22. #endif
  23. #undef PLATFORM_OSX
  24. #if defined(DETAIL__TEMP_PLATFORM_OSX_WAS_1)
  25. #undef DETAIL__TEMP_PLATFORM_OSX_WAS_1
  26. #define PLATFORM_OSX 1
  27. #else
  28. #define PLATFORM_OSX 0
  29. #endif
  30. #undef PLATFORM_LINUX
  31. #if defined(DETAIL__TEMP_PLATFORM_LINUX_WAS_1)
  32. #undef DETAIL__TEMP_PLATFORM_LINUX_WAS_1
  33. #define PLATFORM_LINUX 1
  34. #else
  35. #define PLATFORM_LINUX 0
  36. #endif
  37. #undef PLATFORM_WINRT
  38. #if defined(DETAIL__TEMP_PLATFORM_WINRT_WAS_1)
  39. #undef DETAIL__TEMP_PLATFORM_WINRT_WAS_1
  40. #define PLATFORM_WINRT 1
  41. #else
  42. #define PLATFORM_WINRT 0
  43. #endif
  44. #undef PLATFORM_FAMILY_WINDOWSGAMES
  45. #if defined(DETAIL__TEMP_PLATFORM_FAMILY_WINDOWSGAMES_WAS_1)
  46. #undef DETAIL__TEMP_PLATFORM_FAMILY_WINDOWSGAMES_WAS_1
  47. #define PLATFORM_FAMILY_WINDOWSGAMES 1
  48. #else
  49. #define PLATFORM_FAMILY_WINDOWSGAMES 0
  50. #endif
  51. #undef PLATFORM_WEBGL
  52. #if defined(DETAIL__TEMP_PLATFORM_WEBGL_WAS_1)
  53. #undef DETAIL__TEMP_PLATFORM_WEBGL_WAS_1
  54. #define PLATFORM_WEBGL 1
  55. #else
  56. #define PLATFORM_WEBGL 0
  57. #endif
  58. #undef PLATFORM_ANDROID
  59. #if defined(DETAIL__TEMP_PLATFORM_ANDROID_WAS_1)
  60. #undef DETAIL__TEMP_PLATFORM_ANDROID_WAS_1
  61. #define PLATFORM_ANDROID 1
  62. #else
  63. #define PLATFORM_ANDROID 0
  64. #endif
  65. #undef PLATFORM_PS4
  66. #if defined(DETAIL__TEMP_PLATFORM_PS4_WAS_1)
  67. #undef DETAIL__TEMP_PLATFORM_PS4_WAS_1
  68. #define PLATFORM_PS4 1
  69. #else
  70. #define PLATFORM_PS4 0
  71. #endif
  72. #undef PLATFORM_IPHONE
  73. #if defined(DETAIL__TEMP_PLATFORM_IPHONE_WAS_1)
  74. #undef DETAIL__TEMP_PLATFORM_IPHONE_WAS_1
  75. #define PLATFORM_IPHONE 1
  76. #else
  77. #define PLATFORM_IPHONE 0
  78. #endif
  79. #undef PLATFORM_IOS
  80. #if defined(DETAIL__TEMP_PLATFORM_IOS_WAS_1)
  81. #undef DETAIL__TEMP_PLATFORM_IOS_WAS_1
  82. #define PLATFORM_IOS 1
  83. #else
  84. #define PLATFORM_IOS 0
  85. #endif
  86. #undef PLATFORM_TVOS
  87. #if defined(DETAIL__TEMP_PLATFORM_TVOS_WAS_1)
  88. #undef DETAIL__TEMP_PLATFORM_TVOS_WAS_1
  89. #define PLATFORM_TVOS 1
  90. #else
  91. #define PLATFORM_TVOS 0
  92. #endif
  93. #undef PLATFORM_XBOXONE
  94. #if defined(DETAIL__TEMP_PLATFORM_XBOXONE_WAS_1)
  95. #undef DETAIL__TEMP_PLATFORM_XBOXONE_WAS_1
  96. #define PLATFORM_XBOXONE 1
  97. #else
  98. #define PLATFORM_XBOXONE 0
  99. #endif
  100. #undef PLATFORM_SWITCH
  101. #if defined(DETAIL__TEMP_PLATFORM_SWITCH_WAS_1)
  102. #undef DETAIL__TEMP_PLATFORM_SWITCH_WAS_1
  103. #define PLATFORM_SWITCH 1
  104. #else
  105. #define PLATFORM_SWITCH 0
  106. #endif
  107. #undef PLATFORM_LUMIN
  108. #if defined(DETAIL__TEMP_PLATFORM_LUMIN_WAS_1)
  109. #undef DETAIL__TEMP_PLATFORM_LUMIN_WAS_1
  110. #define PLATFORM_LUMIN 1
  111. #else
  112. #define PLATFORM_LUMIN 0
  113. #endif
  114. #undef PLATFORM_GGP
  115. #if defined(DETAIL__TEMP_PLATFORM_GGP_WAS_1)
  116. #undef DETAIL__TEMP_PLATFORM_GGP_WAS_1
  117. #define PLATFORM_GGP 1
  118. #else
  119. #define PLATFORM_GGP 0
  120. #endif
  121. #undef PLATFORM_NETBSD
  122. #if defined(DETAIL__TEMP_PLATFORM_NETBSD_WAS_1)
  123. #undef DETAIL__TEMP_PLATFORM_NETBSD_WAS_1
  124. #define PLATFORM_NETBSD 1
  125. #else
  126. #define PLATFORM_NETBSD 0
  127. #endif