[vlc-commits] glwin32: don't activate on XP

Jean-Baptiste Kempf git at videolan.org
Tue Aug 7 09:48:32 CEST 2018


vlc/vlc-3.0 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Aug  7 09:46:20 2018 +0200| [ff9689a819936c3af91dae7cba5e9c59337e1c78] | committer: Jean-Baptiste Kempf

glwin32: don't activate on XP

Close #20580

(cherry picked from commit 23e8aa021004679ff212fb95e9244f4ecfeb344c)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/video_output/win32/glwin32.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/video_output/win32/glwin32.c b/modules/video_output/win32/glwin32.c
index 521270bad1..b6e8fbd6d3 100644
--- a/modules/video_output/win32/glwin32.c
+++ b/modules/video_output/win32/glwin32.c
@@ -31,6 +31,7 @@
 #include <vlc_vout_display.h>
 
 #include <windows.h>
+#include <versionhelpers.h>
 
 #define GLEW_STATIC
 #include "../opengl/vout_helper.h"
@@ -113,6 +114,10 @@ static int Open(vlc_object_t *object)
     vout_display_t *vd = (vout_display_t *)object;
     vout_display_sys_t *sys;
 
+    /* do not use OpenGL on XP unless forced */
+    if(!object->obj.force && !IsWindowsVistaOrGreater())
+        return VLC_EGENERIC;
+
     /* Allocate structure */
     vd->sys = sys = calloc(1, sizeof(*sys));
     if (!sys)



More information about the vlc-commits mailing list