On Wed, Jun 29, 2016 at 8:01 PM, Henri Verbeet hverbeet@gmail.com wrote:
On 29 June 2016 at 16:13, Aaryaman Vasishta jem456.vasishta@gmail.com wrote:
This is a helper function, so the caller would be handling the
references.
See CreateDeviceFromD3D in device.c.
That construction makes it harder to verify correctness, so in general I'd recommend against that. Regardless, d3drm_device_destroy() takes care of the device reference, but doesn't help for the IDirect3DRM reference, since that's only released when device->ddraw is set.
device->ddraw is set while returning. What should be the better approach here?
Cheers, Aaryaman