Commit e7d9db4e authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf
Browse files

vout:directd9: don't compile shaders if the headers are not available



It's not found in MS headers anymore, only the old DirectX SDK from 2010.
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent ea992379
...@@ -3291,6 +3291,7 @@ AS_IF([test "${enable_directx}" != "no"], [ ...@@ -3291,6 +3291,7 @@ AS_IF([test "${enable_directx}" != "no"], [
dnl Direct3D9 dnl Direct3D9
AC_CHECK_HEADERS(d3d9.h, [ AC_CHECK_HEADERS(d3d9.h, [
VLC_ADD_PLUGIN([direct3d9]) VLC_ADD_PLUGIN([direct3d9])
AC_CHECK_HEADERS(d3dx9effect.h)
AC_CHECK_FUNCS([IDirectXVideoProcessorService_GetVideoProcessorDeviceGuids], AC_CHECK_FUNCS([IDirectXVideoProcessorService_GetVideoProcessorDeviceGuids],
[ [
......
...@@ -47,7 +47,9 @@ ...@@ -47,7 +47,9 @@
#include <windows.h> #include <windows.h>
#include <d3d9.h> #include <d3d9.h>
#ifdef HAVE_D3DX9EFFECT_H
#include <d3dx9effect.h> #include <d3dx9effect.h>
#endif
#include "../../video_chroma/d3d9_fmt.h" #include "../../video_chroma/d3d9_fmt.h"
#include "common.h" #include "common.h"
...@@ -1293,6 +1295,7 @@ static void Direct3D9DestroyScene(vout_display_t *vd) ...@@ -1293,6 +1295,7 @@ static void Direct3D9DestroyScene(vout_display_t *vd)
static int Direct3D9CompileShader(vout_display_t *vd, const char *shader_source, size_t source_length) static int Direct3D9CompileShader(vout_display_t *vd, const char *shader_source, size_t source_length)
{ {
#ifdef HAVE_D3DX9EFFECT_H
vout_display_sys_t *sys = vd->sys; vout_display_sys_t *sys = vd->sys;
HRESULT (WINAPI * OurD3DXCompileShader)( HRESULT (WINAPI * OurD3DXCompileShader)(
...@@ -1343,6 +1346,9 @@ static int Direct3D9CompileShader(vout_display_t *vd, const char *shader_source, ...@@ -1343,6 +1346,9 @@ static int Direct3D9CompileShader(vout_display_t *vd, const char *shader_source,
return VLC_EGENERIC; return VLC_EGENERIC;
} }
return VLC_SUCCESS; return VLC_SUCCESS;
#else
return VLC_EGENERIC;
#endif
} }
#define MAX_SHADER_FILE_SIZE 1024*1024 #define MAX_SHADER_FILE_SIZE 1024*1024
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment