From: Matteo Bruni <mbruni(a)codeweavers.com> --- dlls/quartz/tests/vmr7.c | 2 +- dlls/quartz/vmr7.c | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index 9502a994576..585f96f1c3c 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -3561,7 +3561,7 @@ static void test_renderless_formats(void) hr = IVMRSurfaceAllocatorNotify_SetDDrawDevice(notify, ddraw, MonitorFromWindow(window, MONITOR_DEFAULTTOPRIMARY)); presenter.ddraw = ddraw; - todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(ddraw); todo_wine ok(ref == 2, "Got unexpected refcount %ld.\n", ref); diff --git a/dlls/quartz/vmr7.c b/dlls/quartz/vmr7.c index 4263e79d54f..830822a21df 100644 --- a/dlls/quartz/vmr7.c +++ b/dlls/quartz/vmr7.c @@ -71,6 +71,8 @@ struct vmr7 IVMRSurfaceAllocator *allocator; IVMRImagePresenter *presenter; IDirectDrawSurface7 **surfaces; + IDirectDraw7 *ddraw; + HMONITOR monitor; DWORD surface_count; DWORD surface_index; DWORD_PTR cookie; @@ -1260,8 +1262,19 @@ static HRESULT WINAPI surface_allocator_notify_AdviseSurfaceAllocator( static HRESULT WINAPI surface_allocator_notify_SetDDrawDevice( IVMRSurfaceAllocatorNotify *iface, IDirectDraw7 *device, HMONITOR monitor) { - FIXME("iface %p, device %p, monitor %p, stub!\n", iface, device, monitor); - return E_NOTIMPL; + struct vmr7 *filter = impl_from_IVMRSurfaceAllocatorNotify(iface); + + TRACE("filter %p, device %p, monitor %p.\n", filter, device, monitor); + + if (!device || monitor == MONITOR_DEFAULTTONULL) + { + WARN("Invalid parameters.\n"); + return E_FAIL; + } + + filter->ddraw = device; + filter->monitor = monitor; + return S_OK; } static HRESULT WINAPI surface_allocator_notify_ChangeDDrawDevice( -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9520