ddraw: Refuse to set a clip list if a clipper is already tracking a window.
This commit is contained in:
parent
3997457574
commit
99e5e3ac0d
|
@ -180,8 +180,13 @@ static HRESULT WINAPI ddraw_clipper_GetClipList(IDirectDrawClipper *iface, RECT
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
static HRESULT WINAPI ddraw_clipper_SetClipList(IDirectDrawClipper *iface, RGNDATA *region, DWORD flags)
|
static HRESULT WINAPI ddraw_clipper_SetClipList(IDirectDrawClipper *iface, RGNDATA *region, DWORD flags)
|
||||||
{
|
{
|
||||||
|
struct ddraw_clipper *clipper = impl_from_IDirectDrawClipper(iface);
|
||||||
|
|
||||||
FIXME("iface %p, region %p, flags %#x stub!\n", iface, region, flags);
|
FIXME("iface %p, region %p, flags %#x stub!\n", iface, region, flags);
|
||||||
|
|
||||||
|
if (clipper->window)
|
||||||
|
return DDERR_CLIPPERISUSINGHWND;
|
||||||
|
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -248,7 +248,7 @@ static void test_clipper_blt(void)
|
||||||
DeleteObject(r1);
|
DeleteObject(r1);
|
||||||
|
|
||||||
hr = IDirectDrawClipper_SetClipList(clipper, rgn_data, 0);
|
hr = IDirectDrawClipper_SetClipList(clipper, rgn_data, 0);
|
||||||
todo_wine ok(hr == DDERR_CLIPPERISUSINGHWND, "Got unexpected hr %#x.\n", hr);
|
ok(hr == DDERR_CLIPPERISUSINGHWND, "Got unexpected hr %#x.\n", hr);
|
||||||
hr = IDirectDrawClipper_SetHWnd(clipper, 0, NULL);
|
hr = IDirectDrawClipper_SetHWnd(clipper, 0, NULL);
|
||||||
ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr);
|
ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr);
|
||||||
hr = IDirectDrawClipper_SetClipList(clipper, rgn_data, 0);
|
hr = IDirectDrawClipper_SetClipList(clipper, rgn_data, 0);
|
||||||
|
|
|
@ -255,7 +255,7 @@ static void test_clipper_blt(void)
|
||||||
DeleteObject(r1);
|
DeleteObject(r1);
|
||||||
|
|
||||||
hr = IDirectDrawClipper_SetClipList(clipper, rgn_data, 0);
|
hr = IDirectDrawClipper_SetClipList(clipper, rgn_data, 0);
|
||||||
todo_wine ok(hr == DDERR_CLIPPERISUSINGHWND, "Got unexpected hr %#x.\n", hr);
|
ok(hr == DDERR_CLIPPERISUSINGHWND, "Got unexpected hr %#x.\n", hr);
|
||||||
hr = IDirectDrawClipper_SetHWnd(clipper, 0, NULL);
|
hr = IDirectDrawClipper_SetHWnd(clipper, 0, NULL);
|
||||||
ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr);
|
ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr);
|
||||||
hr = IDirectDrawClipper_SetClipList(clipper, rgn_data, 0);
|
hr = IDirectDrawClipper_SetClipList(clipper, rgn_data, 0);
|
||||||
|
|
|
@ -550,7 +550,7 @@ static void test_clipper_blt(void)
|
||||||
DeleteObject(r1);
|
DeleteObject(r1);
|
||||||
|
|
||||||
hr = IDirectDrawClipper_SetClipList(clipper, rgn_data, 0);
|
hr = IDirectDrawClipper_SetClipList(clipper, rgn_data, 0);
|
||||||
todo_wine ok(hr == DDERR_CLIPPERISUSINGHWND, "Got unexpected hr %#x.\n", hr);
|
ok(hr == DDERR_CLIPPERISUSINGHWND, "Got unexpected hr %#x.\n", hr);
|
||||||
hr = IDirectDrawClipper_SetHWnd(clipper, 0, NULL);
|
hr = IDirectDrawClipper_SetHWnd(clipper, 0, NULL);
|
||||||
ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr);
|
ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr);
|
||||||
hr = IDirectDrawClipper_SetClipList(clipper, rgn_data, 0);
|
hr = IDirectDrawClipper_SetClipList(clipper, rgn_data, 0);
|
||||||
|
|
|
@ -543,7 +543,7 @@ static void test_clipper_blt(void)
|
||||||
DeleteObject(r1);
|
DeleteObject(r1);
|
||||||
|
|
||||||
hr = IDirectDrawClipper_SetClipList(clipper, rgn_data, 0);
|
hr = IDirectDrawClipper_SetClipList(clipper, rgn_data, 0);
|
||||||
todo_wine ok(hr == DDERR_CLIPPERISUSINGHWND, "Got unexpected hr %#x.\n", hr);
|
ok(hr == DDERR_CLIPPERISUSINGHWND, "Got unexpected hr %#x.\n", hr);
|
||||||
hr = IDirectDrawClipper_SetHWnd(clipper, 0, NULL);
|
hr = IDirectDrawClipper_SetHWnd(clipper, 0, NULL);
|
||||||
ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr);
|
ok(SUCCEEDED(hr), "Failed to set clipper window, hr %#x.\n", hr);
|
||||||
hr = IDirectDrawClipper_SetClipList(clipper, rgn_data, 0);
|
hr = IDirectDrawClipper_SetClipList(clipper, rgn_data, 0);
|
||||||
|
|
Loading…
Reference in New Issue