Browse Source

libobs: Define snprintf only for Visual Studios prior VS2015

This change is purely cosmetic one. _snprintf is still defined in 2015,
but Microsoft may change this in the future.
GoaLitiuM 10 years ago
parent
commit
2ab4c430e0
2 changed files with 3 additions and 4 deletions
  1. 0 4
      libobs/util/platform.c
  2. 3 0
      libobs/util/platform.h

+ 0 - 4
libobs/util/platform.c

@@ -450,10 +450,6 @@ static inline void from_locale(char *buffer)
 		*pos = '.';
 }
 
-#ifdef _WIN32
-#define snprintf _snprintf
-#endif
-
 double os_strtod(const char *str)
 {
 	char buf[64];

+ 3 - 0
libobs/util/platform.h

@@ -137,6 +137,9 @@ EXPORT int os_mkdir(const char *path);
 
 #ifdef _MSC_VER
 #define strtoll _strtoi64
+#if _MSC_VER < 1900
+#define snprintf _snprintf
+#endif
 #endif
 
 #ifdef __cplusplus