Re: [4/8] WineD3D: Destroying the resource frees all private data
On 10/05/07, Stefan Dösinger <stefan(a)codeweavers.com> wrote:
- } + }; Any particular reason for this change?
+ if (Flags & WINED3DSPD_IUNKNOWN) { + if(SizeOfData != 4) { + WARN("IUnknown data with size %d, returning WINED3DERR_INVALIDCALL\n", SizeOfData); + return WINED3DERR_INVALIDCALL; This looks rather questionable to me. Are you making an assumption about the size of a pointer here or is 4 some magic constant?
- list_add_tail(&This->resource.privateData, &data->entry); - return WINED3D_OK; - ... + list_init(&data->entry); + list_add_tail(&This->resource.privateData, &data->entry);
return WINED3D_OK; Is the added list_init() intentional here? Looks redundant to me, if you're doing a list_add_tail() right afterwards anyway.
Am Donnerstag 10 Mai 2007 22:33 schrieb H. Verbeet:
On 10/05/07, Stefan Dösinger <stefan(a)codeweavers.com> wrote:
- } + };
Any particular reason for this change? I don't think so. Must have slipped in accidentally.
+ if (Flags & WINED3DSPD_IUNKNOWN) { + if(SizeOfData != 4) { + WARN("IUnknown data with size %d, returning WINED3DERR_INVALIDCALL\n", SizeOfData); + return WINED3DERR_INVALIDCALL;
This looks rather questionable to me. Are you making an assumption about the size of a pointer here or is 4 some magic constant? Indeed :-/ I just hardcoded 4 as sizeof IUnknown * thoughlessly. We should test that on 64 bit machines, but I guess that sizeof(IUnknown *) is more correct. Does anyone have a 64 bit windows set up to test that?
participants (2)
-
H. Verbeet -
Stefan Dösinger