[vlc-devel] [PATCH] win32: don't override _WIN32_WINNT if there's a better one already

Steve Lhomme robux4 at videolabs.io
Sat Jan 30 09:26:35 CET 2016


---
 modules/audio_output/mmdevice.c       | 6 +++++-
 modules/audio_output/wasapi.c         | 6 +++++-
 modules/video_output/msw/win32touch.h | 4 ++--
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/modules/audio_output/mmdevice.c b/modules/audio_output/mmdevice.c
index 936be42..286bc9d 100644
--- a/modules/audio_output/mmdevice.c
+++ b/modules/audio_output/mmdevice.c
@@ -18,7 +18,11 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#define _WIN32_WINNT 0x600
+#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x600
+# undef _WIN32_WINNT
+# define _WIN32_WINNT 0x600
+#endif
+
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
diff --git a/modules/audio_output/wasapi.c b/modules/audio_output/wasapi.c
index dda012f..a474af9 100644
--- a/modules/audio_output/wasapi.c
+++ b/modules/audio_output/wasapi.c
@@ -18,7 +18,11 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#define _WIN32_WINNT 0x600
+#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x600
+# undef _WIN32_WINNT
+# define _WIN32_WINNT 0x600
+#endif
+
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
diff --git a/modules/video_output/msw/win32touch.h b/modules/video_output/msw/win32touch.h
index d3f9128..8e86eae 100644
--- a/modules/video_output/msw/win32touch.h
+++ b/modules/video_output/msw/win32touch.h
@@ -24,10 +24,10 @@
 #ifndef VLC_GESTURE_H_
 #define VLC_GESTURE_H_
 
-# ifdef _WIN32_WINNT
+# if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x601
 #  undef _WIN32_WINNT
+#  define _WIN32_WINNT 0x0601
 # endif
-# define _WIN32_WINNT 0x0601
 # include <windows.h>
 # include <winuser.h>
 
-- 
2.6.0.windows.1



More information about the vlc-devel mailing list