summaryrefslogtreecommitdiff
path: root/display/driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'display/driver.c')
-rw-r--r--display/driver.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/display/driver.c b/display/driver.c
index c00adb0..9abecb3 100644
--- a/display/driver.c
+++ b/display/driver.c
@@ -1283,14 +1283,12 @@ out_error:
VOID APIENTRY DrvDeleteDeviceBitmap(DHSURF dhsurf)
{
UINT32 surface_id;
- PDev *pdev;
SurfaceInfo *surface;
surface = (SurfaceInfo *)dhsurf;
- pdev = surface->pdev;
- surface_id = surface - pdev->surfaces_info;
+ surface_id = GetSurfaceIdFromInfo(surface);
- DeleteDeviceBitmap(pdev, surface_id, DEVICE_BITMAP_ALLOCATION_TYPE_VRAM);
+ DeleteDeviceBitmap(surface->pdev, surface_id, DEVICE_BITMAP_ALLOCATION_TYPE_VRAM);
}
#ifdef CALL_TEST