[vlc-devel] [PATCH 2/2] direct3d11: check the right flag combination
Steve Lhomme
robux4 at gmail.com
Wed May 27 15:05:57 CEST 2015
---
modules/video_output/msw/direct3d11.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/video_output/msw/direct3d11.c
b/modules/video_output/msw/direct3d11.c
index a708cbb..898bc8d 100644
--- a/modules/video_output/msw/direct3d11.c
+++ b/modules/video_output/msw/direct3d11.c
@@ -876,7 +876,7 @@ static int Direct3D11Open(vout_display_t *vd,
video_format_t *fmt)
if( SUCCEEDED( ID3D11Device_CheckFormatSupport(sys->d3ddevice,
d3d_formats[i].formatTexture,
&i_formatSupport)) &&
- ( i_formatSupport & i_quadSupportFlags ))
+ ( i_formatSupport & i_quadSupportFlags ) ==
i_quadSupportFlags )
{
msg_Dbg(vd, "Using pixel format %s",
d3d_formats[i].name );
sys->vlcFormat = d3d_formats[i].fourcc;
@@ -896,7 +896,7 @@ static int Direct3D11Open(vout_display_t *vd,
video_format_t *fmt)
if( SUCCEEDED( ID3D11Device_CheckFormatSupport(sys->d3ddevice,
d3d_formats[i].formatTexture,
&i_formatSupport)) &&
- ( i_formatSupport & i_quadSupportFlags ))
+ ( i_formatSupport & i_quadSupportFlags ) ==
i_quadSupportFlags )
{
msg_Dbg(vd, "Using pixel format %s",
d3d_formats[i].name );
sys->vlcFormat = d3d_formats[i].fourcc;
@@ -918,14 +918,14 @@ static int Direct3D11Open(vout_display_t *vd,
video_format_t *fmt)
if( SUCCEEDED( ID3D11Device_CheckFormatSupport(sys->d3ddevice,
DXGI_FORMAT_R8G8B8A8_UNORM,
&i_formatSupport)) &&
- ( i_formatSupport & i_quadSupportFlags )) {
+ ( i_formatSupport & i_quadSupportFlags ) ==
i_quadSupportFlags) {
sys->d3dregion_format = DXGI_FORMAT_R8G8B8A8_UNORM;
sys->pSubpictureChromas[0] = VLC_CODEC_RGBA;
sys->pSubpictureChromas[1] = 0;
} else if( SUCCEEDED( ID3D11Device_CheckFormatSupport(sys->d3ddevice,
DXGI_FORMAT_B8G8R8A8_UNORM,
&i_formatSupport)) &&
- ( i_formatSupport & i_quadSupportFlags )) {
+ ( i_formatSupport & i_quadSupportFlags ) ==
i_quadSupportFlags) {
sys->d3dregion_format = DXGI_FORMAT_B8G8R8A8_UNORM;
sys->pSubpictureChromas[0] = VLC_CODEC_BGRA;
sys->pSubpictureChromas[1] = 0;
--
1.9.5.msysgit.0
More information about the vlc-devel
mailing list