Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/surface.c:
void d3dximage_info_from_d3dx_image(D3DXIMAGE_INFO *info, struct d3dx_image *image) {
- info->ImageFileFormat = image->image_file_format;
- info->ImageFileFormat = (D3DXIMAGE_FILEFORMAT)image->image_file_format;
I haven't really checked how this looks in the end, so this might be a bad take on my part, but this cast kinda rings a bell. Here I'd expect a call to a (likely trivial) function converting from the d3dx-neutral `enum d3dx_image_file_format` to the d3dx9-specific `D3DXIMAGE_FILEFORMAT`. The function could also validate the values if need be (or make it simple to add that later on if not necessary right away).