Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/evr/presenter.c | 14 ++++++++++++-- dlls/evr/tests/evr.c | 10 ++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/dlls/evr/presenter.c b/dlls/evr/presenter.c index eceabfd381d..8c455778d77 100644 --- a/dlls/evr/presenter.c +++ b/dlls/evr/presenter.c @@ -61,6 +61,7 @@ struct video_presenter HWND video_window; MFVideoNormalizedRect src_rect; RECT dst_rect; + DWORD rendering_prefs; unsigned int state; CRITICAL_SECTION cs; }; @@ -658,9 +659,18 @@ static HRESULT WINAPI video_presenter_control_SetRenderingPrefs(IMFVideoDisplayC
static HRESULT WINAPI video_presenter_control_GetRenderingPrefs(IMFVideoDisplayControl *iface, DWORD *flags) { - FIXME("%p, %p.\n", iface, flags); + struct video_presenter *presenter = impl_from_IMFVideoDisplayControl(iface);
- return E_NOTIMPL; + TRACE("%p, %p.\n", iface, flags); + + if (!flags) + return E_POINTER; + + EnterCriticalSection(&presenter->cs); + *flags = presenter->rendering_prefs; + LeaveCriticalSection(&presenter->cs); + + return S_OK; }
static HRESULT WINAPI video_presenter_control_SetFullscreen(IMFVideoDisplayControl *iface, BOOL fullscreen) diff --git a/dlls/evr/tests/evr.c b/dlls/evr/tests/evr.c index db9546a945b..85eedbe6643 100644 --- a/dlls/evr/tests/evr.c +++ b/dlls/evr/tests/evr.c @@ -979,6 +979,7 @@ static void test_default_presenter(void) HWND hwnd, hwnd2; HANDLE handle; IUnknown *unk; + DWORD flags; float rate; HRESULT hr; GUID iid; @@ -1016,6 +1017,15 @@ static void test_default_presenter(void)
hr = IMFGetService_GetService(gs, &MR_VIDEO_RENDER_SERVICE, &IID_IMFVideoDisplayControl, (void **)&display_control); ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IMFVideoDisplayControl_GetRenderingPrefs(display_control, NULL); + ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + + flags = 123; + hr = IMFVideoDisplayControl_GetRenderingPrefs(display_control, &flags); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(!flags, "Unexpected rendering flags %#x.\n", flags); + IMFVideoDisplayControl_Release(display_control);
hr = IMFGetService_GetService(gs, &MR_VIDEO_ACCELERATION_SERVICE, &IID_IDirect3DDeviceManager9, (void **)&dm);