vlc | branch: master | Steve Lhomme <[email protected]> | Tue Jul 31 15:15:48 
2018 +0200| [c0abd168d4e9c4d9f60112105da8b9ff5f1df74b] | committer: Steve Lhomme

direct3d9: use a version check with a better name to disable D3D9

The VersionHelpers API is available since Win2000

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c0abd168d4e9c4d9f60112105da8b9ff5f1df74b
---

 modules/video_output/win32/direct3d9.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/video_output/win32/direct3d9.c 
b/modules/video_output/win32/direct3d9.c
index d91daab237..2cb4141704 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -56,6 +56,7 @@
 #include "builtin_shaders.h"
 
 #include <assert.h>
+#include <versionhelpers.h>
 
 /*****************************************************************************
  * Module descriptor
@@ -253,9 +254,8 @@ static int Open(vlc_object_t *object)
     if ( !vd->obj.force && vd->source.mastering.max_luminance != 0)
         return VLC_EGENERIC; /* let a module who can handle it do it */
 
-    OSVERSIONINFO winVer;
-    winVer.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
-    if(GetVersionEx(&winVer) && winVer.dwMajorVersion < 6 && 
!object->obj.force)
+    /* do not use D3D9 on XP unless forced */
+    if(!object->obj.force && !IsWindowsVistaOrGreater())
         return VLC_EGENERIC;
 
     /* Allocate structure */

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to