Hi Oliver,
+HRESULT WINAPI IWineD3DDeviceImpl_CreateQuery(IWineD3DDevice *iface, D3DQUERYTYPE Type, IWineD3DQuery** ppQuery){ + IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; + + if(NULL == ppQuery){ + /*Just a check to see if we support this type of query*/ + HRESULT hr = D3DERR_NOTAVAILABLE; + /*Lie and say everything is good (we can return ok fake data from a stub)*/ + switch(Type){ + case WINED3DQUERYTYPE_VCACHE: + hr = D3D_OK; + case WINED3DQUERYTYPE_RESOURCEMANAGER: + hr = D3D_OK;
These are missing a break statement. Better style would be to take advantage of the fallthrough like so: + switch(Type){ + case WINED3DQUERYTYPE_VCACHE: + case WINED3DQUERYTYPE_RESOURCEMANAGER: (all the other WINED3DQUERYTYPE_ cases) + hr = D3D_OK; + break;
+struct IWineD3DQueryImpl +{ + IWineD3DQueryVtbl *lpVtbl; + DWORD ref; /* Note: Ref counting not required */ + IWineD3DDeviceImpl *wineD3DDevice; + /* IWineD3DQuery fields */ + D3DQUERYTYPE type; + void *data; + int dataSize; + + +};
What's with the couple of blank lines in the struct declaration? Yeah, so I'm picky ;)
+DWORD WINAPI IWineD3DQueryImpl_GetDataSize(IWineD3DQuery* iface){ + IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface; + FIXME("(%p) : stub \n", This); + int dataSize = 0; + switch(This->type){ + case WINED3DQUERYTYPE_VCACHE: + dataSize = sizeof(D3DDEVINFO_VCACHE); + case WINED3DQUERYTYPE_RESOURCEMANAGER:
Aren't these case statements missing a break statement too?
--Juan
__________________________________ Do you Yahoo!? All your favorites on one personal page � Try My Yahoo! http://my.yahoo.com
On Fri, 28 Jan 2005 11:39:53 -0800, Juan Lang wrote:
/*Just a check to see if we support this type of query*/
HRESULT hr = D3DERR_NOTAVAILABLE;
While we're being picky about silly details, normal Wine code style is to have a space between the comment markers and the comment, ie
/* foo */
not
/*foo*/
thanks -mike
While we're being picky about silly details, normal
Wine code style is to have a space between the comment markers and the comment, ie
/* foo */
not
/*foo*/
thanks -mike
opps, missed this in v3, I'll send up a incremental with cosmetics in later, and try to make sure everything else conforms a bit better in feature.
I've got another few days worth of patches ahead, so I expect there will be a few more mistakes and non standards bits coming up until I get used to breaking patches properly.
___________________________________________________________ ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com
On Sat, 2005-01-29 at 00:12 +0000, Oliver Stieber wrote:
I've got another few days worth of patches ahead, so I expect there will be a few more mistakes and non standards bits coming up until I get used to breaking patches properly.
Sure, no problem, don't let me slow you down!
By the way, if you're finding patch management tricky I'll show you how to use SVK (if you want). In the simplest mode of operation it lets you create a patch, create another patch etc and keep them separated even before AJ commits to CVS. I've been using it for the DCOM work and it's going well.
thanks -mike