[vlc-devel] commit: Fixed fullscreen size with multiple display (Laurent Aimar )

git version control git at videolan.org
Fri Oct 30 12:05:27 CET 2009


vlc | branch: 1.0-bugfix | Laurent Aimar <fenrir at videolan.org> | Fri Oct 30 11:56:37 2009 +0100| [4f93dcef56f13e939669f8e35b7ff396f5fadc34] | committer: Jean-Baptiste Kempf 

Fixed fullscreen size with multiple display

The fix from quality in [8d8844adcd8e44d58291a2e8d025ca3ca3c89067] introduced a weird artefact with dual screens, where the video didn't fill the complete screen. This fixes it.
(cherry picked from commit 7c081ad1cc3167273ae1252108cf077ab6863747)

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

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

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

diff --git a/modules/video_output/msw/direct3d.c b/modules/video_output/msw/direct3d.c
index e2040af..8951bbe 100644
--- a/modules/video_output/msw/direct3d.c
+++ b/modules/video_output/msw/direct3d.c
@@ -723,6 +723,16 @@ static int Direct3DFillPresentationParameters(vout_thread_t *p_vout)
     d3dpp->BackBufferCount        = 1;
     d3dpp->EnableAutoDepthStencil = FALSE;
 
+    const unsigned i_adapter_count = IDirect3D9_GetAdapterCount(p_d3dobj);
+    for( unsigned i = 1; i < i_adapter_count; i++ )
+    {
+        hr = IDirect3D9_GetAdapterDisplayMode(p_d3dobj, i, &d3ddm );
+        if( FAILED(hr) )
+            continue;
+        d3dpp->BackBufferWidth  = __MAX(d3dpp->BackBufferWidth,  d3ddm.Width);
+        d3dpp->BackBufferHeight = __MAX(d3dpp->BackBufferHeight, d3ddm.Height);
+    }
+
     RECT *display = &p_vout->p_sys->rect_display;
     display->left   = 0;
     display->top    = 0;




More information about the vlc-devel mailing list