SDL_config_win32.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. /*
  2. SDL - Simple DirectMedia Layer
  3. Copyright (C) 1997-2012 Sam Lantinga
  4. This library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with this library; if not, write to the Free Software
  14. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  15. Sam Lantinga
  16. slouken@libsdl.org
  17. */
  18. #ifndef _SDL_config_win32_h
  19. #define _SDL_config_win32_h
  20. #include "SDL_platform.h"
  21. /* This is a set of defines to configure the SDL features */
  22. #if defined(__GNUC__) || defined(__DMC__)
  23. #define HAVE_STDINT_H 1
  24. #elif defined(_MSC_VER)
  25. typedef signed __int8 int8_t;
  26. typedef unsigned __int8 uint8_t;
  27. typedef signed __int16 int16_t;
  28. typedef unsigned __int16 uint16_t;
  29. typedef signed __int32 int32_t;
  30. typedef unsigned __int32 uint32_t;
  31. typedef signed __int64 int64_t;
  32. typedef unsigned __int64 uint64_t;
  33. #ifndef _UINTPTR_T_DEFINED
  34. #ifdef _WIN64
  35. typedef unsigned __int64 uintptr_t;
  36. #else
  37. typedef unsigned int uintptr_t;
  38. #endif
  39. #define _UINTPTR_T_DEFINED
  40. #endif
  41. /* Older Visual C++ headers don't have the Win64-compatible typedefs... */
  42. #if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
  43. #define DWORD_PTR DWORD
  44. #endif
  45. #if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
  46. #define LONG_PTR LONG
  47. #endif
  48. #else /* !__GNUC__ && !_MSC_VER */
  49. typedef signed char int8_t;
  50. typedef unsigned char uint8_t;
  51. typedef signed short int16_t;
  52. typedef unsigned short uint16_t;
  53. typedef signed int int32_t;
  54. typedef unsigned int uint32_t;
  55. typedef signed long long int64_t;
  56. typedef unsigned long long uint64_t;
  57. #ifndef _SIZE_T_DEFINED_
  58. #define _SIZE_T_DEFINED_
  59. typedef unsigned int size_t;
  60. #endif
  61. typedef unsigned int uintptr_t;
  62. #endif /* __GNUC__ || _MSC_VER */
  63. #define SDL_HAS_64BIT_TYPE 1
  64. /* Enabled for SDL 1.2 (binary compatibility) */
  65. #define HAVE_LIBC 1
  66. #ifdef HAVE_LIBC
  67. /* Useful headers */
  68. #define HAVE_STDIO_H 1
  69. #define STDC_HEADERS 1
  70. #define HAVE_STRING_H 1
  71. #define HAVE_CTYPE_H 1
  72. #define HAVE_MATH_H 1
  73. #ifndef _WIN32_WCE
  74. #define HAVE_SIGNAL_H 1
  75. #endif
  76. /* C library functions */
  77. #define HAVE_MALLOC 1
  78. #define HAVE_CALLOC 1
  79. #define HAVE_REALLOC 1
  80. #define HAVE_FREE 1
  81. #define HAVE_ALLOCA 1
  82. #define HAVE_QSORT 1
  83. #define HAVE_ABS 1
  84. #define HAVE_MEMSET 1
  85. #define HAVE_MEMCPY 1
  86. #define HAVE_MEMMOVE 1
  87. #define HAVE_MEMCMP 1
  88. #define HAVE_STRLEN 1
  89. #define HAVE__STRREV 1
  90. #define HAVE__STRUPR 1
  91. #define HAVE__STRLWR 1
  92. #define HAVE_STRCHR 1
  93. #define HAVE_STRRCHR 1
  94. #define HAVE_STRSTR 1
  95. #define HAVE_ITOA 1
  96. #define HAVE__LTOA 1
  97. #define HAVE__ULTOA 1
  98. #define HAVE_STRTOL 1
  99. #define HAVE_STRTOUL 1
  100. #define HAVE_STRTOLL 1
  101. #define HAVE_STRTOD 1
  102. #define HAVE_ATOI 1
  103. #define HAVE_ATOF 1
  104. #define HAVE_STRCMP 1
  105. #define HAVE_STRNCMP 1
  106. #define HAVE__STRICMP 1
  107. #define HAVE__STRNICMP 1
  108. #define HAVE_SSCANF 1
  109. #else
  110. #define HAVE_STDARG_H 1
  111. #define HAVE_STDDEF_H 1
  112. #endif
  113. /* Enable various audio drivers */
  114. #ifndef _WIN32_WCE
  115. #define SDL_AUDIO_DRIVER_DSOUND 1
  116. #endif
  117. #define SDL_AUDIO_DRIVER_WAVEOUT 1
  118. #define SDL_AUDIO_DRIVER_DISK 1
  119. #define SDL_AUDIO_DRIVER_DUMMY 1
  120. /* Enable various cdrom drivers */
  121. #ifdef _WIN32_WCE
  122. #define SDL_CDROM_DISABLED 1
  123. #else
  124. #define SDL_CDROM_WIN32 1
  125. #endif
  126. /* Enable various input drivers */
  127. #ifdef _WIN32_WCE
  128. #define SDL_JOYSTICK_DISABLED 1
  129. #else
  130. #define SDL_JOYSTICK_WINMM 1
  131. #endif
  132. /* Enable various shared object loading systems */
  133. #define SDL_LOADSO_WIN32 1
  134. /* Enable various threading systems */
  135. #define SDL_THREAD_WIN32 1
  136. /* Enable various timer systems */
  137. #ifdef _WIN32_WCE
  138. #define SDL_TIMER_WINCE 1
  139. #else
  140. #define SDL_TIMER_WIN32 1
  141. #endif
  142. /* Enable various video drivers */
  143. #ifdef _WIN32_WCE
  144. #define SDL_VIDEO_DRIVER_GAPI 1
  145. #endif
  146. #ifndef _WIN32_WCE
  147. #define SDL_VIDEO_DRIVER_DDRAW 1
  148. #endif
  149. #define SDL_VIDEO_DRIVER_DUMMY 1
  150. #define SDL_VIDEO_DRIVER_WINDIB 1
  151. /* Enable OpenGL support */
  152. #ifndef _WIN32_WCE
  153. #define SDL_VIDEO_OPENGL 1
  154. #define SDL_VIDEO_OPENGL_WGL 1
  155. #endif
  156. /* Disable screensaver */
  157. #define SDL_VIDEO_DISABLE_SCREENSAVER 1
  158. /* Enable assembly routines (Win64 doesn't have inline asm) */
  159. #ifndef _WIN64
  160. #define SDL_ASSEMBLY_ROUTINES 1
  161. #endif
  162. #endif /* _SDL_config_win32_h */