Al Tobey <tobert <at> gmail.com> writes: > > Ack, after thinking about it and talking with people on IRC, I think I > did the wrong thing. New patch attached that just copies the > parameters one-by-one to the passed-in struct. Both methods work, > though, so this probably needs to be tested on Windows. > > In any case, this one is probably safest for now. > -Al Tobey
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 :) In any case, your second patch looks much better, but as Robert said, can't you simplify it with a memcpy() instead of an exhaustive list of the structure members? That is, assuming This->createParms and pParameters are of the same type you could just do: { ... memcpy(pParameters, &This->createParms, sizeof(D3DDEVICE_CREATION_PARAMETERS)); return D3D_OK; } This is much less error-prone than a list of structure members. Regards, Aric