Signed-off-by: Paul Gofman gofmanp@gmail.com --- dlls/ddraw/device.c | 8 ++++++++ dlls/ddraw/tests/ddraw4.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 3d7aca538b..e07fe007f0 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -2725,6 +2725,14 @@ static HRESULT WINAPI d3d_device3_SetRenderState(IDirect3DDevice3 *iface,
case D3DRENDERSTATE_TEXTUREMAPBLEND: { + if (value == device->texture_map_blend) + { + TRACE("Application is setting the same value over, nothing to do.\n"); + + hr = D3D_OK; + break; + } + device->legacyTextureBlending = TRUE;
switch (value) diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index e5614f9b7f..6121f4f2c1 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -9689,13 +9689,13 @@ static void test_texturemapblend(void) ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
color = get_surface_color(rt, 5, 5); - todo_wine ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); color = get_surface_color(rt, 400, 5); ok(compare_color(color, 0x000000ff, 2), "Got unexpected color 0x%08x.\n", color); color = get_surface_color(rt, 5, 245); ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08x.\n", color); color = get_surface_color(rt, 400, 245); - todo_wine ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x00000080, 2), "Got unexpected color 0x%08x.\n", color);
/* Turn legacy texture blending on again. */ hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_TEXTUREMAPBLEND, D3DTBLEND_ADD);