ddraw: Use wined3d_texture_get_dc() in ddraw_surface_update_frontbuffer().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2016-02-01 18:42:08 +01:00 committed by Alexandre Julliard
parent 7561f34381
commit 88c9ade49c
1 changed files with 3 additions and 3 deletions

View File

@ -73,7 +73,7 @@ HRESULT ddraw_surface_update_frontbuffer(struct ddraw_surface *surface, const RE
surface->wined3d_texture, surface->sub_resource_idx, rect, 0, NULL, WINED3D_TEXF_POINT);
}
if (FAILED(hr = wined3d_surface_getdc(surface->wined3d_surface, &surface_dc)))
if (FAILED(hr = wined3d_texture_get_dc(surface->wined3d_texture, surface->sub_resource_idx, &surface_dc)))
{
ERR("Failed to get surface DC, hr %#x.\n", hr);
return hr;
@ -83,7 +83,7 @@ HRESULT ddraw_surface_update_frontbuffer(struct ddraw_surface *surface, const RE
if (!(screen_dc = GetDC(NULL)))
{
wined3d_surface_releasedc(surface->wined3d_surface, surface_dc);
wined3d_texture_release_dc(surface->wined3d_texture, surface->sub_resource_idx, surface_dc);
ERR("Failed to get screen DC.\n");
return E_FAIL;
}
@ -96,7 +96,7 @@ HRESULT ddraw_surface_update_frontbuffer(struct ddraw_surface *surface, const RE
surface_dc, x, y, SRCCOPY);
ReleaseDC(NULL, screen_dc);
wined3d_surface_releasedc(surface->wined3d_surface, surface_dc);
wined3d_texture_release_dc(surface->wined3d_texture, surface->sub_resource_idx, surface_dc);
if (!ret)
{