On Wed May 15 14:08:06 2024 +0000, Matteo Bruni wrote:
This is clearly fine as a bug fix, of course. One might question if this is the proper place though, i.e. should we offset the dest rect inside `d3dx_load_image_from_memory()`? I think, in terms of API, here is right place. Regardless of what `d3dx_image_decompress()` might need, `d3dx_load_image_from_memory()` receives a plain destination memory pointer with no info about any origin offset (or you can also see this as, `dst_memory` is the address of the top-left pixel, as far as `d3dx_load_image_from_memory()` is concerned). This is effectively a fix for `D3DXLoadSurfaceFromMemory()` passing down bad dest rects. Bottom line, I think the patch is great but the commit subject / message can use some improvement.
I had some trouble writing the commit subject / message for this one, it's hard for me to write something that summarizes the issue succinctly for some reason. I've changed it now, hopefully it's closer to what you would expect. :)