[vlc-commits] [Git][videolan/vlc][master] 4 commits: win32: remove _WIN32_WINNT force to Win7 or older

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Oct 11 06:09:00 UTC 2021



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
7b29989f by Steve Lhomme at 2021-10-11T07:41:53+02:00
win32: remove _WIN32_WINNT force to Win7 or older

In 4.0 we always build for win7 or higher.

- - - - -
9d5df23f by Steve Lhomme at 2021-10-11T07:41:53+02:00
gui: qt: add comment about the minimum _WIN32_WINNT value forced

We want API's available since Win8.1 for DirectComposition.

- - - - -
a0abbc59 by Steve Lhomme at 2021-10-11T07:42:04+02:00
gui: qt: simplify d3d11/dcomp includes

They are necessary in the acrylic header (with 8.1 API's) and uisurface (win7)
so they don't need to be included with the wrong version in compositor_dcomp.hpp

- - - - -
cb5fee6c by Steve Lhomme at 2021-10-11T07:42:05+02:00
configure: remove checks for Vista+ _WIN32_WINNT

This is always true in 4.0 builds and ensured earlier.

- - - - -


12 changed files:

- configure.ac
- modules/codec/avcodec/directx_va.h
- modules/codec/mft.c
- modules/gui/qt/maininterface/compositor_dcomp.hpp
- modules/gui/qt/maininterface/compositor_dcomp_acrylicsurface.hpp
- modules/gui/qt/maininterface/compositor_dcomp_uisurface.hpp
- modules/video_output/win32/d3d11_quad.cpp
- modules/video_output/win32/d3d11_shaders.cpp
- modules/video_output/win32/d3d11_swapchain.cpp
- modules/video_output/win32/direct3d11.cpp
- modules/video_output/win32/dxgi_swapchain.cpp
- modules/video_output/win32/win32touch.h


Changes:

=====================================
configure.ac
=====================================
@@ -786,9 +786,6 @@ AC_LINK_IFELSE([
     AC_LANG_PROGRAM([#ifdef _WIN32
         #include <ws2tcpip.h>
         #include <windows.h>
-        # if _WIN32_WINNT < 0x600
-        #  error Needs vista+
-        # endif
         #else
         #include <sys/socket.h>
         #include <arpa/inet.h>
@@ -2601,9 +2598,7 @@ AS_IF([test "${enable_dxva2}" != "no"], [
     AS_IF([test "${enable_dxva2}" = "yes"],
           [AC_MSG_ERROR([dxva2 is present but libavcodec/dxva2.h is missing])],
               [AC_MSG_WARN([dxva2 is present but libavcodec/dxva2.h is missing ])])
-        ], [#undef _WIN32_WINNT
-            /* DXVA2 is only available in Vista and above */
-            #define _WIN32_WINNT 0x600])
+        ], [])
       ],[
     AS_IF([test "${enable_dxva2}" = "yes"],
               [AC_MSG_ERROR([Could not find required dxva2api.h])],
@@ -2640,9 +2635,7 @@ AS_IF([test "${enable_d3d11va}" != "no"], [
                   AS_IF([test "${enable_d3d11va}" = "yes"],
                     [AC_MSG_ERROR([d3d11va is present but libavcodec/d3d11va.h is missing])],
                         [AC_MSG_WARN([d3d11va is present but libavcodec/d3d11va.h is missing ])])
-                  ], [#undef _WIN32_WINNT
-                      /* D3D11 is only available in Vista and above */
-                      #define _WIN32_WINNT 0x600])
+                  ], [])
                   ],[
                     AS_IF([test "${enable_d3d11va}" = "yes"],
                           [AC_MSG_ERROR([Could not find required dxva2api.h])],


=====================================
modules/codec/avcodec/directx_va.h
=====================================
@@ -27,12 +27,6 @@
 #ifndef AVCODEC_DIRECTX_VA_H
 #define AVCODEC_DIRECTX_VA_H
 
-# if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600 // _WIN32_WINNT_VISTA
-/* d3d11 needs Vista support */
-#  undef _WIN32_WINNT
-#  define _WIN32_WINNT 0x0600 // _WIN32_WINNT_VISTA
-# endif
-
 #include <vlc_common.h>
 
 #include <libavcodec/avcodec.h>


=====================================
modules/codec/mft.c
=====================================
@@ -1149,7 +1149,7 @@ static int FindMFT(decoder_t *p_dec)
 
 static int LoadMFTLibrary(MFHandle *mf)
 {
-#if _WIN32_WINNT < _WIN32_WINNT_WIN7 || defined(VLC_WINSTORE_APP) || __MINGW64_VERSION_MAJOR < 6
+#if defined(VLC_WINSTORE_APP) || __MINGW64_VERSION_MAJOR < 6
     mf->mfplat_dll = LoadLibrary(TEXT("mfplat.dll"));
     if (!mf->mfplat_dll)
         return VLC_EGENERIC;


=====================================
modules/gui/qt/maininterface/compositor_dcomp.hpp
=====================================
@@ -22,15 +22,6 @@
 
 #include <windows.h>
 
-# if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x603)
-#  undef _WIN32_WINNT
-#  define _WIN32_WINNT 0x0603
-# endif
-#include <dcomp.h>
-#include <d3d11.h>
-#include <wrl.h>
-#include <dwmapi.h>
-
 #include "maininterface/mainui.hpp"
 #include "compositor_dcomp_acrylicsurface.hpp"
 #include "compositor_dcomp_uisurface.hpp"


=====================================
modules/gui/qt/maininterface/compositor_dcomp_acrylicsurface.hpp
=====================================
@@ -26,7 +26,8 @@
 
 #include <windows.h>
 
-# if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x603)
+// Win 8.1 for IDCompositionDevice3/IDCompositionVisual2
+# if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0603) // _WIN32_WINNT_WINBLUE
 #  undef _WIN32_WINNT
 #  define _WIN32_WINNT 0x0603
 # endif


=====================================
modules/gui/qt/maininterface/compositor_dcomp_uisurface.hpp
=====================================
@@ -29,11 +29,6 @@
 
 #include <windows.h>
 
-# if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x603)
-#  undef _WIN32_WINNT
-#  define _WIN32_WINNT 0x0603
-# endif
-
 #include <d3d11_1.h>
 #include <dcomp.h>
 #include <wrl.h>


=====================================
modules/video_output/win32/d3d11_quad.cpp
=====================================
@@ -24,11 +24,6 @@
 # include "config.h"
 #endif
 
-#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0601 // _WIN32_WINNT_WIN7
-# undef _WIN32_WINNT
-# define _WIN32_WINNT 0x0601 // _WIN32_WINNT_WIN7
-#endif
-
 #include <cassert>
 #include <vlc_common.h>
 


=====================================
modules/video_output/win32/d3d11_shaders.cpp
=====================================
@@ -24,11 +24,6 @@
 # include "config.h"
 #endif
 
-#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0601 // _WIN32_WINNT_WIN7
-# undef _WIN32_WINNT
-# define _WIN32_WINNT 0x0601 // _WIN32_WINNT_WIN7
-#endif
-
 #include <vlc_common.h>
 
 #include <cassert>


=====================================
modules/video_output/win32/d3d11_swapchain.cpp
=====================================
@@ -33,11 +33,6 @@
 
 #include <cassert>
 
-#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0601 // _WIN32_WINNT_WIN7
-# undef _WIN32_WINNT
-# define _WIN32_WINNT 0x0601 // _WIN32_WINNT_WIN7
-#endif
-
 #include <windows.h>
 
 #include <d3d11.h>


=====================================
modules/video_output/win32/direct3d11.cpp
=====================================
@@ -25,11 +25,6 @@
 # include "config.h"
 #endif
 
-#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0601 // _WIN32_WINNT_WIN7
-# undef _WIN32_WINNT
-# define _WIN32_WINNT 0x0601 // _WIN32_WINNT_WIN7
-#endif
-
 #include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_vout_display.h>


=====================================
modules/video_output/win32/dxgi_swapchain.cpp
=====================================
@@ -27,11 +27,6 @@
 
 #include <cassert>
 
-#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0601 // _WIN32_WINNT_WIN7
-# undef _WIN32_WINNT
-# define _WIN32_WINNT 0x0601 // _WIN32_WINNT_WIN7
-#endif
-
 #include <vlc_es.h>
 
 #if defined(HAVE_DCOMP_H) && !defined(VLC_WINSTORE_APP)


=====================================
modules/video_output/win32/win32touch.h
=====================================
@@ -24,10 +24,6 @@
 #ifndef VLC_GESTURE_H_
 #define VLC_GESTURE_H_
 
-# if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x601
-#  undef _WIN32_WINNT
-#  define _WIN32_WINNT 0x0601
-# endif
 # include <windows.h>
 # include <winuser.h>
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/581a2fe94681a24444fcad40ea9fe37b533429c8...cb5fee6ca36fe8302d937cc90033834aa3d5d933

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/581a2fe94681a24444fcad40ea9fe37b533429c8...cb5fee6ca36fe8302d937cc90033834aa3d5d933
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list