Commit bf461e64 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

quartz: Check whether the pin is connected in IVideoWindow::put_Caption().

Ferro CCTV calls this.
parent 7eaac918
...@@ -2379,6 +2379,11 @@ static void test_video_window(void) ...@@ -2379,6 +2379,11 @@ static void test_video_window(void)
hr = IVideoWindow_get_Caption(window, &caption); hr = IVideoWindow_get_Caption(window, &caption);
todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
caption = SysAllocString(L"foo");
hr = IVideoWindow_put_Caption(window, caption);
ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
SysFreeString(caption);
hr = IVideoWindow_get_WindowStyle(window, &l); hr = IVideoWindow_get_WindowStyle(window, &l);
todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
......
...@@ -2378,6 +2378,11 @@ static void test_video_window(void) ...@@ -2378,6 +2378,11 @@ static void test_video_window(void)
hr = IVideoWindow_get_Caption(window, &caption); hr = IVideoWindow_get_Caption(window, &caption);
todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
caption = SysAllocString(L"foo");
hr = IVideoWindow_put_Caption(window, caption);
ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
SysFreeString(caption);
hr = IVideoWindow_get_WindowStyle(window, &l); hr = IVideoWindow_get_WindowStyle(window, &l);
todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
......
...@@ -2604,6 +2604,11 @@ static void test_video_window(void) ...@@ -2604,6 +2604,11 @@ static void test_video_window(void)
hr = IVideoWindow_get_Caption(window, &caption); hr = IVideoWindow_get_Caption(window, &caption);
todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
caption = SysAllocString(L"foo");
hr = IVideoWindow_put_Caption(window, caption);
ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
SysFreeString(caption);
hr = IVideoWindow_get_WindowStyle(window, &l); hr = IVideoWindow_get_WindowStyle(window, &l);
todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
......
...@@ -194,6 +194,9 @@ HRESULT WINAPI BaseControlWindowImpl_put_Caption(IVideoWindow *iface, BSTR capti ...@@ -194,6 +194,9 @@ HRESULT WINAPI BaseControlWindowImpl_put_Caption(IVideoWindow *iface, BSTR capti
TRACE("window %p, caption %s.\n", window, debugstr_w(caption)); TRACE("window %p, caption %s.\n", window, debugstr_w(caption));
if (!window->pPin->peer)
return VFW_E_NOT_CONNECTED;
if (!SetWindowTextW(window->hwnd, caption)) if (!SetWindowTextW(window->hwnd, caption))
return E_FAIL; return E_FAIL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment