dlls/wined3d/device.c GetCreationParameters

H. Verbeet hverbeet at gmail.com
Mon Jan 16 02:04:05 CST 2006

On 16/01/06, Aric Cyr <Aric.Cyr at gmail.com> wrote:
> Interesting that your original patch made things work at all... you set the
> pParameters variable, which is then promptly forgotten upon return from the
> function.  In effect your original patch does nothing... so why it would make
> things work is beyond me :)
If the D3DDEVICE_CREATION_PARAMETERS struct got zeroed out before
being passed to GetCreationParameters, DeviceType would now be 0 while
it was 1 (D3DDEVTYPE_HAL) before. I don't know if that's enough to
make things work.

> {
>   ...
>   memcpy(pParameters, &This->createParms, sizeof(D3DDEVICE_CREATION_PARAMETERS));
>   return D3D_OK;
> }
> This is much less error-prone than a list of structure members.

*pParameters = This->createParms;
should probably work as well, if "struct assignment" is acceptable in wine.
And of course checking if pParameters is a valid pointer in the first
place is probably a good idea as well.

More information about the wine-devel mailing list