From 88c9ade49c5f6a1a891df1212d7f9c7185c0f680 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 1 Feb 2016 18:42:08 +0100 Subject: [PATCH] ddraw: Use wined3d_texture_get_dc() in ddraw_surface_update_frontbuffer(). Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/ddraw/surface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index c9ac73cea3b..bc304ca5979 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -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) {