[PATCH 1/2] d3drm: Fix QueryInterface for IDirect3DRMTexture*.

Aaryaman Vasishta jem456.vasishta at gmail.com
Mon Jan 18 21:53:53 CST 2016


I'm not really sure either, as I had followed the way other d3drm
interfaces did it on wine. I'll re-send the patch with your suggestions.

Cheers,
Aaryaman

On Tue, Jan 19, 2016 at 3:09 AM, Henri Verbeet <hverbeet at gmail.com> wrote:

> On 18 January 2016 at 19:57, Aaryaman Vasishta
> <jem456.vasishta at gmail.com> wrote:
> > -    if (IsEqualGUID(riid, &IID_IDirect3DRMTexture2)
> > -            || IsEqualGUID(riid, &IID_IDirect3DRMTexture)
> > +    if (IsEqualGUID(riid, &IID_IDirect3DRMTexture)
> > +            || IsEqualGUID(riid, &IID_IDirect3DRMVisual)
> > +            || IsEqualGUID(riid, &IID_IDirect3DRMObject)
> >              || IsEqualGUID(riid, &IID_IUnknown))
> >      {
> > +        *out = &texture->IDirect3DRMTexture_iface;
> This isn't necessarily wrong, but it does seem weird. You return
> &texture->IDirect3DRMTexture_iface here for e.g. IUnknown, but the
> implementation then forwards to &texture->IDirect3DRMTexture3_iface.
> It seems more logical to return the IDirect3DRMTexture3 interface here
> directly.
>
> We also tend to check the "newest" IID first, in D3D code at least.
> I.e., IID_IDirect3DRMTexture3 before IID_IDirect3DRMTexture.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20160119/fe0042dd/attachment.html>


More information about the wine-devel mailing list