A game creates a vmr7 filter, inserts it in a IFilterGraph2 and calls put_FullScreenMode(OAFALSE) on the graph's IVideoWindow.
This currently returns E_NOTIMPL in Wine and the game quits on that error code.
A full solution would likely require to implement IFullScreenVideoEx filter, and other bits, but this simpler approach let the game move forward.
Also tested & fixed calling put_FullScreenMode on the current mode returns S_FALSE instead of S_OK.
From: Eric Pouech epouech@codeweavers.com
Signed-off-by: Eric Pouech epouech@codeweavers.com --- dlls/quartz/tests/filtergraph.c | 8 ++++++++ dlls/quartz/tests/vmr7.c | 12 ++++++++++++ 2 files changed, 20 insertions(+)
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index df1db0cfed6..04e486aba38 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -2966,6 +2966,14 @@ static void test_control_delegation(void) hr = IVideoWindow_SetWindowForeground(window, OAFALSE); ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
+ val = 0xdeadbeef; + hr = IVideoWindow_get_FullScreenMode(window, &val); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(val == OAFALSE, "Got fullscreen %lu\n", val); + + hr = IVideoWindow_put_FullScreenMode(window, OAFALSE); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + hr = IFilterGraph2_RemoveFilter(graph, renderer); ok(hr == S_OK, "Got hr %#lx.\n", hr);
diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index 028f14838c3..b7f36134bcd 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -2466,6 +2466,18 @@ static void test_video_window(void) hr = IVideoWindow_GetMaxIdealImageSize(window, &width, &height); todo_wine ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr);
+ IVideoWindow_Release(window); + + hr = IFilterGraph2_QueryInterface(graph, &IID_IVideoWindow, (void **)&window); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + l = 0xdeadbeef; + hr = IVideoWindow_get_FullScreenMode(window, &l); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(l == OAFALSE, "Got fullscreenmode %ld.\n", l); + hr = IVideoWindow_put_FullScreenMode(window, l); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + IFilterGraph2_Release(graph); IVideoWindow_Release(window); IOverlay_Release(overlay);
From: Eric Pouech epouech@codeweavers.com
Signed-off-by: Eric Pouech epouech@codeweavers.com --- dlls/quartz/filtergraph.c | 7 +++++++ dlls/quartz/tests/vmr7.c | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 4696d5ced01..cc66b17c75b 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -4504,6 +4504,11 @@ static HRESULT WINAPI VideoWindow_get_FullScreenMode(IVideoWindow *iface, LONG *
if (hr == S_OK) hr = IVideoWindow_get_FullScreenMode(pVideoWindow, FullScreenMode); + if (hr == E_NOTIMPL) + { + *FullScreenMode = OAFALSE; + hr = S_OK; + }
LeaveCriticalSection(&This->cs);
@@ -4524,6 +4529,8 @@ static HRESULT WINAPI VideoWindow_put_FullScreenMode(IVideoWindow *iface, LONG F
if (hr == S_OK) hr = IVideoWindow_put_FullScreenMode(pVideoWindow, FullScreenMode); + if (hr == E_NOTIMPL && FullScreenMode == OAFALSE) + hr = S_FALSE;
LeaveCriticalSection(&This->cs);
diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index b7f36134bcd..58753242108 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -2473,10 +2473,10 @@ static void test_video_window(void)
l = 0xdeadbeef; hr = IVideoWindow_get_FullScreenMode(window, &l); - todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); - todo_wine ok(l == OAFALSE, "Got fullscreenmode %ld.\n", l); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(l == OAFALSE, "Got fullscreenmode %ld.\n", l); hr = IVideoWindow_put_FullScreenMode(window, l); - todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IFilterGraph2_Release(graph); IVideoWindow_Release(window);
From: Eric Pouech epouech@codeweavers.com
Signed-off-by: Eric Pouech epouech@codeweavers.com --- dlls/quartz/tests/filtergraph.c | 2 +- dlls/quartz/videorenderer.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index 04e486aba38..2bcb8a158c0 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -2972,7 +2972,7 @@ static void test_control_delegation(void) ok(val == OAFALSE, "Got fullscreen %lu\n", val);
hr = IVideoWindow_put_FullScreenMode(window, OAFALSE); - todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_RemoveFilter(graph, renderer); ok(hr == S_OK, "Got hr %#lx.\n", hr); diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index e6735367cb3..bbd34678dfd 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -291,6 +291,9 @@ static HRESULT WINAPI VideoWindow_put_FullScreenMode(IVideoWindow *iface, LONG f
FIXME("filter %p, fullscreen %ld.\n", filter, fullscreen);
+ if (fullscreen == filter->FullScreenMode) + return S_FALSE; + if (fullscreen) { filter->saved_style = GetWindowLongW(window, GWL_STYLE);
This merge request was approved by Elizabeth Figura.