]> git.sesse.net Git - vlc/commitdiff
Fixed fullscreen size with multiple display
authorLaurent Aimar <fenrir@videolan.org>
Fri, 30 Oct 2009 10:56:37 +0000 (11:56 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 30 Oct 2009 11:00:32 +0000 (12:00 +0100)
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.

modules/video_output/msw/direct3d.c

index 5fd9c8452aece3ffe0d0007b5e55ab1ded60db9f..7b528093706a32c7ed72886bab2fd493e145fe0e 100644 (file)
@@ -522,6 +522,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;