[vlc-commits] Direct3D: reject too old drivers and let them fallback to DirectDraw

Jean-Baptiste Kempf git at videolan.org
Mon Mar 26 18:44:52 CEST 2012


vlc/vlc-2.0 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Mar 23 17:04:31 2012 +0100| [043959a67dfcf6cf5bb6b9f27746495de9fc9e9a] | committer: Jean-Baptiste Kempf

Direct3D: reject too old drivers and let them fallback to DirectDraw

They would not work with IDirect3DDevice9::StretchRect
See:
http://forum.videolan.org/viewtopic.php?f=14&t=99498
http://forum.videolan.org/viewtopic.php?f=14&t=99235
http://forum.videolan.org/viewtopic.php?f=14&t=98882
http://forum.videolan.org/viewtopic.php?f=14&t=98514
(cherry picked from commit 544af798a1ec033321a51125c2c71769cc7b7873)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/video_output/msw/direct3d.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/modules/video_output/msw/direct3d.c b/modules/video_output/msw/direct3d.c
index ec605c2..9f40065 100644
--- a/modules/video_output/msw/direct3d.c
+++ b/modules/video_output/msw/direct3d.c
@@ -510,6 +510,10 @@ static int Direct3DCreate(vout_display_t *vd)
     }
 
     /* TODO: need to test device capabilities and select the right render function */
+    if (!(sys->d3dcaps.DevCaps2 & D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES)) {
+        msg_Err(vd, "Device does not support stretching from textures.");
+        return VLC_EGENERIC;
+    }
 
     return VLC_SUCCESS;
 }



More information about the vlc-commits mailing list