Aric.Cyr at gmail.com
Mon Jan 16 21:00:01 CST 2006
Al Tobey <tobert <at> gmail.com> writes:
> Here is the new patch. I did some additional testing and couldn't
> get the same app to fail on that function again. It still works with
> this new patch, so I'm assuming for now that it's correct. Anyways,
> thanks again.
Almost got it this time :)
You should be checking that pParameters is not NULL, not &This->createParms.
Note that if This is not-NULL, &This->creatParms will be not null as well since
you are just getting the address of a struct. Also on failure, according to
MSDN, you shoudl be returning D3DERR_INVALIDCALL not OUTOFVIDEOMEMORY.
Probably the following would be most correct:
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
if (This == NULL || pParameters == NULL)
memcpy(pParameters, &This->createParms, sizeof(D3DDEVICE_CREATION_PARAMETERS));
More information about the wine-devel