[PATCH 2/4] d3drm: Implement IDirect3DRMTexture{2-3}_InitFromImage.

Stefan Dösinger stefandoesinger at gmail.com
Fri Apr 29 02:26:17 CDT 2016


> Am 28.04.2016 um 20:17 schrieb Aaryaman Vasishta <jem456.vasishta at gmail.com>:
> 
> +    if (texture->d3drm && texture->initialized)
> +        IDirect3DRM_Release(texture->d3drm);
I thought the idea was to use AddDestroyCallback instead of a flag to control the Release call. Do I remember this incorrectly, or what's the reason for going back to a flag?

Also, what's the difference between image != NULL and initialized? Or, in a later stage when you have initFromTexture or what it is called, image != NULL || ddraw_texture != NULL?

>  IDirect3DRM_AddRef(texture->d3drm);
> +
> +    if (texture->image)
> +        return D3DRMERR_BADOBJECT;
Afair  the ref leak here is intentional. If it is, I think it's worth adding a comment.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20160429/7364a06b/attachment.sig>


More information about the wine-devel mailing list