[vlc-devel] commit: Allocated a direct3d back buffer as large as the whole virtual screen. ( Laurent Aimar )
git version control
git at videolan.org
Mon Dec 21 18:49:32 CET 2009
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Dec 21 18:47:27 2009 +0100| [f2d0e53b9f6127eae6bf7a4bf808e4a1d8174663] | committer: Laurent Aimar
Allocated a direct3d back buffer as large as the whole virtual screen.
It will allow to resize the video on multiple monitors.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f2d0e53b9f6127eae6bf7a4bf808e4a1d8174663
---
modules/video_output/msw/direct3d.c | 15 ++++-----------
1 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/modules/video_output/msw/direct3d.c b/modules/video_output/msw/direct3d.c
index 970f3a3..f04368d 100644
--- a/modules/video_output/msw/direct3d.c
+++ b/modules/video_output/msw/direct3d.c
@@ -515,8 +515,10 @@ static int Direct3DFillPresentationParameters(vout_display_t *vd)
d3dpp->Flags = D3DPRESENTFLAG_VIDEO;
d3dpp->Windowed = TRUE;
d3dpp->hDeviceWindow = vd->sys->hvideownd;
- d3dpp->BackBufferWidth = d3ddm.Width;
- d3dpp->BackBufferHeight = d3ddm.Height;
+ d3dpp->BackBufferWidth = __MAX(GetSystemMetrics(SM_CXVIRTUALSCREEN),
+ d3ddm.Width);
+ d3dpp->BackBufferHeight = __MAX(GetSystemMetrics(SM_CYVIRTUALSCREEN),
+ d3ddm.Height);
d3dpp->SwapEffect = D3DSWAPEFFECT_COPY;
d3dpp->MultiSampleType = D3DMULTISAMPLE_NONE;
d3dpp->PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT;
@@ -524,15 +526,6 @@ static int Direct3DFillPresentationParameters(vout_display_t *vd)
d3dpp->BackBufferCount = 1;
d3dpp->EnableAutoDepthStencil = FALSE;
- const unsigned adapter_count = IDirect3D9_GetAdapterCount(sys->d3dobj);
- for (unsigned i = 1; i < adapter_count; i++) {
- hr = IDirect3D9_GetAdapterDisplayMode(sys->d3dobj, i, &d3ddm);
- if (FAILED(hr))
- continue;
- d3dpp->BackBufferWidth = __MAX(d3dpp->BackBufferWidth, d3ddm.Width);
- d3dpp->BackBufferHeight = __MAX(d3dpp->BackBufferHeight, d3ddm.Height);
- }
-
/* */
RECT *display = &vd->sys->rect_display;
display->left = 0;
More information about the vlc-devel
mailing list