[dx9-12] Major change to desgin

Alexandre Julliard julliard at winehq.org
Tue Oct 26 16:58:48 CDT 2004


"Ann and Jason Edmeades" <us at the-edmeades.demon.co.uk> writes:

> I think this patch should keep you happy (It doesn't do any of the
> IWineUserDevice stuff as the code isn't ready for it, but does the dual ref
> count + adds Set/Get Stream source). Let me know if you have problems with
> it.

Looks much better yes, thanks. There's still something strange here:

> +    /* Not recording... */
> +    if (oldSrc != NULL) {
> +        IWineD3DVertexBuffer_Release(oldSrc);
> +        IUnknown_Release((IUnknown *)((IWineD3DVertexBufferImpl *)oldSrc)->resource.parent);  /* Released an internal reference to a VB */
> +    }
> +    if (pStreamData != NULL) {
> +        IWineD3DVertexBuffer_AddRef(pStreamData);
> +        IUnknown_AddRef((IUnknown *)((IWineD3DVertexBufferImpl *)pStreamData)->resource.parent); /* Gained an internal reference to a VB */
> +    }

You shouldn't need to AddRef the parent, that's up to the object that
holds the pointer (also you should do the AddRef before the Release in
case old and new are the same object).

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list