ddraw: Check for mipmap sublevel through caps in ddraw_surface7_SetColorKey().
Enabled some previously failing tests in ddraw/tests/ddraw7.c. Signed-off-by: Riccardo Bortolato <rikyz619@gmail.com> Signed-off-by: Stefan Dösinger <stefandoesinger@gmx.at> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d2d8d8f13e
commit
cb03e216e5
|
@ -4726,13 +4726,8 @@ static HRESULT WINAPI ddraw_surface7_SetColorKey(IDirectDrawSurface7 *iface, DWO
|
|||
|
||||
TRACE("iface %p, flags %#x, color_key %p.\n", iface, flags, color_key);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
if (!surface->wined3d_texture)
|
||||
{
|
||||
wined3d_mutex_unlock();
|
||||
if (surface->surface_desc.ddsCaps.dwCaps2 & DDSCAPS2_MIPMAPSUBLEVEL)
|
||||
return DDERR_NOTONMIPMAPSUBLEVEL;
|
||||
}
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
return ddraw_surface_set_color_key(surface, flags, color_key);
|
||||
}
|
||||
|
|
|
@ -1764,15 +1764,15 @@ static void test_ck_complex(void)
|
|||
color_key.dwColorSpaceLowValue = 0x000000ff;
|
||||
color_key.dwColorSpaceHighValue = 0x000000ff;
|
||||
hr = IDirectDrawSurface7_SetColorKey(mipmap, DDCKEY_SRCBLT, &color_key);
|
||||
todo_wine ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr);
|
||||
ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr);
|
||||
|
||||
color_key.dwColorSpaceLowValue = 0;
|
||||
color_key.dwColorSpaceHighValue = 0;
|
||||
hr = IDirectDrawSurface7_GetColorKey(mipmap, DDCKEY_SRCBLT, &color_key);
|
||||
todo_wine ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr);
|
||||
todo_wine ok(color_key.dwColorSpaceLowValue == 0x000000ff, "Got unexpected value 0x%08x.\n",
|
||||
ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr);
|
||||
ok(color_key.dwColorSpaceLowValue == 0x000000ff, "Got unexpected value 0x%08x.\n",
|
||||
color_key.dwColorSpaceLowValue);
|
||||
todo_wine ok(color_key.dwColorSpaceHighValue == 0x000000ff, "Got unexpected value 0x%08x.\n",
|
||||
ok(color_key.dwColorSpaceHighValue == 0x000000ff, "Got unexpected value 0x%08x.\n",
|
||||
color_key.dwColorSpaceHighValue);
|
||||
|
||||
IDirectDrawSurface_AddRef(mipmap);
|
||||
|
|
Loading…
Reference in New Issue