Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/volume.c:
- IDirect3DVolume9_UnlockBox(dst_volume); - } + hr = IDirect3DVolume9_LockBox(dst_volume, &locked_box, &dst_box_aligned, 0); + if (FAILED(hr)) + return hr;
- return D3D_OK; + dst_pixels.data = locked_box.pBits; + dst_pixels.row_pitch = locked_box.RowPitch; + dst_pixels.slice_pitch = locked_box.SlicePitch; + dst_pixels.palette = dst_palette; + dst_pixels.width = dst_box_aligned.Right - dst_box_aligned.Left; + dst_pixels.height = dst_box_aligned.Bottom - dst_box_aligned.Top; + dst_pixels.depth = dst_box_aligned.Back - dst_box_aligned.Front; + SetRect(&dst_pixels.unaligned_rect, dst_box->Left, dst_box->Top, dst_box->Right, dst_box->Bottom); + OffsetRect(&dst_pixels.unaligned_rect, -dst_rect_aligned.left, -dst_rect_aligned.top); Same as for `D3DXLoadSurfaceFromMemory()`, can we use `d3dx_pixels_init()` here?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/5666#note_71711