Signed-off-by: Paul Gofman pgofman@codeweavers.com --- dlls/ddraw/surface.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 19a1ae3d2d2..08e3811436d 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -1027,6 +1027,7 @@ static HRESULT surface_lock(struct ddraw_surface *surface, DWORD flags, HANDLE h) { struct wined3d_map_desc map_desc; + unsigned int wined3d_flags; struct wined3d_box box; HRESULT hr = DD_OK;
@@ -1061,9 +1062,12 @@ static HRESULT surface_lock(struct ddraw_surface *surface, if (surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) hr = ddraw_surface_update_frontbuffer(surface, rect, TRUE, 0); if (SUCCEEDED(hr)) + { + wined3d_flags = wined3dmapflags_from_ddrawmapflags(flags); hr = wined3d_resource_map(wined3d_texture_get_resource - (ddraw_surface_get_default_texture(surface, DDRAW_SURFACE_RW)), surface->sub_resource_idx, - &map_desc, rect ? &box : NULL, wined3dmapflags_from_ddrawmapflags(flags)); + (ddraw_surface_get_default_texture(surface, wined3d_flags & WINED3D_MAP_WRITE ? DDRAW_SURFACE_RW + : DDRAW_SURFACE_READ)), surface->sub_resource_idx, &map_desc, rect ? &box : NULL, wined3d_flags); + } if (FAILED(hr)) { wined3d_mutex_unlock();
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=87765
Your paranoid android.
=== debiant2 (build log) ===
WineRunWineTest.pl:error: The task timed out WineRunWineTest.pl:error: The previous 1 run(s) terminated abnormally
=== debiant2 (build log) ===
Task: WineTest did not produce the wow32 report