Parcourir la source

MSVC has __declspec(deprecated)

Anonymous Maarten il y a 2 ans
Parent
commit
917e036f6f
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      include/SDL3/SDL_begin_code.h

+ 2 - 0
include/SDL3/SDL_begin_code.h

@@ -36,6 +36,8 @@
 #ifndef SDL_DEPRECATED
 #ifndef SDL_DEPRECATED
 #  if defined(__GNUC__) && (__GNUC__ >= 4)  /* technically, this arrived in gcc 3.1, but oh well. */
 #  if defined(__GNUC__) && (__GNUC__ >= 4)  /* technically, this arrived in gcc 3.1, but oh well. */
 #    define SDL_DEPRECATED __attribute__((deprecated))
 #    define SDL_DEPRECATED __attribute__((deprecated))
+#  elif defined(_MSC_VER)
+#    define SDL_DEPRECATED __declspec(deprecated)
 #  else
 #  else
 #    define SDL_DEPRECATED
 #    define SDL_DEPRECATED
 #  endif
 #  endif