d3dx9/tests: Add DDS pixel format tests for D3DXGetImageInfoFromFileInMemory.

Józef Kucia joseph.kucia at gmail.com
Thu Apr 19 14:28:08 CDT 2012


On Thu, Apr 19, 2012 at 8:23 PM, Matteo Bruni <matteo.mystral at gmail.com> wrote:
> Il 19 aprile 2012 19:37, Józef Kucia <joseph.kucia at gmail.com> ha scritto:
>> ---
>>  dlls/d3dx9_36/tests/surface.c |   65 +++++++++++++++++++++++++++++++++++++++++
>>  1 files changed, 65 insertions(+), 0 deletions(-)
>>
>> diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c
>> index 87aa03e..51d6ebd 100644
>> --- a/dlls/d3dx9_36/tests/surface.c
>> +++ b/dlls/d3dx9_36/tests/surface.c
>> @@ -22,6 +22,8 @@
>>  #include "wine/test.h"
>>  #include "d3dx9tex.h"
>>  #include "resources.h"
>> +#undef MAKE_DDHRESULT
>> +#include "ddraw.h"
>>
>
> I'm not sure that's a good idea. ddraw.h is not included in recent
> DirectX SDKs and the relevant definitions are "gone", as far as I
> know. So I think d3dx9 or its tests should not depend on that header.
>
> I'd just (re)declare the stuff you need privately in the test source
> file instead. You don't even need to use the same
> types/defines/variables names as those from ddraw.h, you just have to
> keep them compatible.
>
> On that point, I see that MSDN mentions the equivalent DDS_HEADER and
> DDS_PIXELFORMAT structures
> (http://msdn.microsoft.com/en-us/library/windows/desktop/bb943991%28v=vs.85%29.aspx),
> except those don't seem to be defined in the MS headers either. I
> guess you are free to use whatever names you like...

I also had doubts about including ddraw.h but I was reluctant to
duplicate the code. Thanks.



More information about the wine-devel mailing list