On Thu, May 10, 2012 at 4:29 PM, Matteo Bruni matteo.mystral@gmail.com wrote:
2012/5/9 Józef Kucia joseph.kucia@gmail.com:
+HRESULT load_texture_from_dds(IDirect3DTexture9 *texture, const void *src_data, UINT srd_data_size,
- const PALETTEENTRY *palette, DWORD filter, D3DCOLOR color_key, const D3DXIMAGE_INFO *src_info) DECLSPEC_HIDDEN;
...
+HRESULT load_texture_from_dds(IDirect3DTexture9 *texture, const void *src_data, UINT srd_data_size,
- const PALETTEENTRY *palette, DWORD filter, D3DCOLOR color_key, const D3DXIMAGE_INFO *src_info)
I guess that was meant to be called "src_data_size". More to the point, anyway, you're not using that value right now, you should probably add a check against it or remove the parameter altogether.
It should be removed. The size of data is checked in D3DXGetImageInfoFromFileInMemory, and at this point it can be assumed that data is long enough.