programs/dxdiag: beginnings of support for /t option

Henri Verbeet hverbeet at gmail.com
Fri Mar 11 08:49:02 CST 2011


On 10 March 2011 20:35, Drew Goodwin <drew at drewgoodwin.com> wrote:
> I'm a CS student at UCLA. I and some classmates are adding features to
> wine's dxdiag. Here's the first patch, with code by Steve Feng, Andrew
> Freer, and myself, properly copyrighted and licensed under the LGPL. Once
> this is accepted, we will send a series of patches to support the remaining
> sections in the /t option and the /x option, and add a working gui.
>
Just some random comments, this is by no means a proper review:

> -EXTRADEFS = -DWINE_NO_UNICODE_MACROS
> +EXTRADEFS = -DWINE_NO_UNICODE_MACROS -D__WINE__
What do you need __WINE__ for?

> +IMPORTS   = advapi32 comdlg32 comctl32 d3d9 d3dx9 ddraw dsound dxguid gdi32 kernel32 ole32 oleaut32 shell32 user32 winmm
> +
That's a lot of imports, do you really need all of those in this patch?

> +HINSTANCE g_hinstance;
The way you're using this, that's just a slightly odd way to write "NULL".

> +    sysinfo = malloc(sizeof(DxDiag_SystemInfo));
You should typically use HeapAlloc() for memory allocation in Wine,
except for rare cases where you pass the result to a library function
that free()'s it. You also leak the sysinfo, but perhaps that's ok as
long as you exit right after being done with it.

The "g_dxdiagcom_root" global isn't very useful, just pass it to
OutputPlainFile() directly.



More information about the wine-devel mailing list