Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49375 Signed-off-by: Paul Gofman pgofman@codeweavers.com --- dlls/ddraw/tests/ddraw7.c | 2 +- dlls/wined3d/texture.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 42262ce9ac7..89b5157f4dc 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -7206,7 +7206,7 @@ static void test_set_surface_desc(void) reset_ddsd(&ddsd); hr = IDirectDrawSurface7_Lock(surface2, NULL, &ddsd, 0, NULL); ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - todo_wine ok(ddsd.lpSurface == surface2_system_mem, "Got unexpected lpSurface %p.\n", ddsd.lpSurface); + ok(ddsd.lpSurface == surface2_system_mem, "Got unexpected lpSurface %p.\n", ddsd.lpSurface); IDirectDrawSurface7_Unlock(surface2, NULL);
reset_ddsd(&ddsd); diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 3db2b14988b..76291368558 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -1833,7 +1833,8 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT create_dib = true; }
- wined3d_resource_free_sysmem(&texture->resource); + if (!update_memory_only || texture->level_count * texture->layer_count == 1) + wined3d_resource_free_sysmem(&texture->resource);
if (!update_memory_only) {