Commit bd8db45e authored by H. Verbeet's avatar H. Verbeet Committed by Alexandre Julliard

wined3d: Update the QueryInterface functions of IWineD3DBase subclasses.

parent c6515ab3
...@@ -62,8 +62,8 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_QueryInterface(IWineD3DBaseTexture *iface ...@@ -62,8 +62,8 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_QueryInterface(IWineD3DBaseTexture *iface
{ {
IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj); TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
/* FIXME: This needs to extend an IWineD3DBaseObject */
if (IsEqualGUID(riid, &IID_IUnknown) if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|| IsEqualGUID(riid, &IID_IWineD3DResource) || IsEqualGUID(riid, &IID_IWineD3DResource)
|| IsEqualGUID(riid, &IID_IWineD3DBaseTexture)) { || IsEqualGUID(riid, &IID_IWineD3DBaseTexture)) {
IUnknown_AddRef(iface); IUnknown_AddRef(iface);
......
...@@ -52,6 +52,7 @@ HRESULT WINAPI IWineD3DCubeTextureImpl_QueryInterface(IWineD3DCubeTexture *iface ...@@ -52,6 +52,7 @@ HRESULT WINAPI IWineD3DCubeTextureImpl_QueryInterface(IWineD3DCubeTexture *iface
IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface; IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj); TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
if (IsEqualGUID(riid, &IID_IUnknown) if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|| IsEqualGUID(riid, &IID_IWineD3DResource) || IsEqualGUID(riid, &IID_IWineD3DResource)
|| IsEqualGUID(riid, &IID_IWineD3DBaseTexture) || IsEqualGUID(riid, &IID_IWineD3DBaseTexture)
|| IsEqualGUID(riid, &IID_IWineD3DTexture)) { || IsEqualGUID(riid, &IID_IWineD3DTexture)) {
......
...@@ -329,10 +329,10 @@ void WINAPI IWineD3DDeviceImpl_SetupTextureStates(IWineD3DDevice *iface, DWORD S ...@@ -329,10 +329,10 @@ void WINAPI IWineD3DDeviceImpl_SetupTextureStates(IWineD3DDevice *iface, DWORD S
HRESULT WINAPI IWineD3DDeviceImpl_QueryInterface(IWineD3DDevice *iface,REFIID riid,LPVOID *ppobj) HRESULT WINAPI IWineD3DDeviceImpl_QueryInterface(IWineD3DDevice *iface,REFIID riid,LPVOID *ppobj)
{ {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
/* FIXME: This needs to extend an IWineD3DBaseObject */
TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj); TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
if (IsEqualGUID(riid, &IID_IUnknown) if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|| IsEqualGUID(riid, &IID_IWineD3DDevice)) { || IsEqualGUID(riid, &IID_IWineD3DDevice)) {
IUnknown_AddRef(iface); IUnknown_AddRef(iface);
*ppobj = This; *ppobj = This;
......
...@@ -166,10 +166,10 @@ static void WineD3D_ReleaseFakeGLContext(WineD3D_Context* ctx) { ...@@ -166,10 +166,10 @@ static void WineD3D_ReleaseFakeGLContext(WineD3D_Context* ctx) {
HRESULT WINAPI IWineD3DImpl_QueryInterface(IWineD3D *iface,REFIID riid,LPVOID *ppobj) HRESULT WINAPI IWineD3DImpl_QueryInterface(IWineD3D *iface,REFIID riid,LPVOID *ppobj)
{ {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
/* FIXME: This needs to extend an IWineD3DBaseObject */
TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj); TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
if (IsEqualGUID(riid, &IID_IUnknown) if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|| IsEqualGUID(riid, &IID_IWineD3DDevice)) { || IsEqualGUID(riid, &IID_IWineD3DDevice)) {
IUnknown_AddRef(iface); IUnknown_AddRef(iface);
*ppobj = This; *ppobj = This;
......
...@@ -35,6 +35,7 @@ HRESULT WINAPI IWineD3DIndexBufferImpl_QueryInterface(IWineD3DIndexBuffer *iface ...@@ -35,6 +35,7 @@ HRESULT WINAPI IWineD3DIndexBufferImpl_QueryInterface(IWineD3DIndexBuffer *iface
IWineD3DIndexBufferImpl *This = (IWineD3DIndexBufferImpl *)iface; IWineD3DIndexBufferImpl *This = (IWineD3DIndexBufferImpl *)iface;
TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj); TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
if (IsEqualGUID(riid, &IID_IUnknown) if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|| IsEqualGUID(riid, &IID_IWineD3DResource) || IsEqualGUID(riid, &IID_IWineD3DResource)
|| IsEqualGUID(riid, &IID_IWineD3DIndexBuffer)){ || IsEqualGUID(riid, &IID_IWineD3DIndexBuffer)){
IUnknown_AddRef(iface); IUnknown_AddRef(iface);
......
...@@ -62,6 +62,7 @@ HRESULT WINAPI IWineD3DPixelShaderImpl_QueryInterface(IWineD3DPixelShader *iface ...@@ -62,6 +62,7 @@ HRESULT WINAPI IWineD3DPixelShaderImpl_QueryInterface(IWineD3DPixelShader *iface
IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)iface; IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)iface;
TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj); TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
if (IsEqualGUID(riid, &IID_IUnknown) if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|| IsEqualGUID(riid, &IID_IWineD3DPixelShader)) { || IsEqualGUID(riid, &IID_IWineD3DPixelShader)) {
IUnknown_AddRef(iface); IUnknown_AddRef(iface);
*ppobj = This; *ppobj = This;
......
...@@ -38,6 +38,7 @@ HRESULT WINAPI IWineD3DQueryImpl_QueryInterface(IWineD3DQuery *iface, REFIID rii ...@@ -38,6 +38,7 @@ HRESULT WINAPI IWineD3DQueryImpl_QueryInterface(IWineD3DQuery *iface, REFIID rii
IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface; IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj); TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
if (IsEqualGUID(riid, &IID_IUnknown) if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|| IsEqualGUID(riid, &IID_IWineD3DQuery)) { || IsEqualGUID(riid, &IID_IWineD3DQuery)) {
IUnknown_AddRef(iface); IUnknown_AddRef(iface);
*ppobj = This; *ppobj = This;
......
...@@ -33,6 +33,7 @@ HRESULT WINAPI IWineD3DResourceImpl_QueryInterface(IWineD3DResource *iface, REFI ...@@ -33,6 +33,7 @@ HRESULT WINAPI IWineD3DResourceImpl_QueryInterface(IWineD3DResource *iface, REFI
IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface; IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface;
TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj); TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
if (IsEqualGUID(riid, &IID_IUnknown) if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|| IsEqualGUID(riid, &IID_IWineD3DResource)) { || IsEqualGUID(riid, &IID_IWineD3DResource)) {
IUnknown_AddRef(iface); IUnknown_AddRef(iface);
*ppobj = This; *ppobj = This;
......
...@@ -34,6 +34,7 @@ HRESULT WINAPI IWineD3DStateBlockImpl_QueryInterface(IWineD3DStateBlock *iface,R ...@@ -34,6 +34,7 @@ HRESULT WINAPI IWineD3DStateBlockImpl_QueryInterface(IWineD3DStateBlock *iface,R
IWineD3DStateBlockImpl *This = (IWineD3DStateBlockImpl *)iface; IWineD3DStateBlockImpl *This = (IWineD3DStateBlockImpl *)iface;
TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj); TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
if (IsEqualGUID(riid, &IID_IUnknown) if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|| IsEqualGUID(riid, &IID_IWineD3DStateBlock)){ || IsEqualGUID(riid, &IID_IWineD3DStateBlock)){
IUnknown_AddRef(iface); IUnknown_AddRef(iface);
*ppobj = This; *ppobj = This;
......
...@@ -40,6 +40,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_QueryInterface(IWineD3DSurface *iface, REFIID ...@@ -40,6 +40,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_QueryInterface(IWineD3DSurface *iface, REFIID
ERR("Probably FIXME: Calling query interface with NULL riid\n"); ERR("Probably FIXME: Calling query interface with NULL riid\n");
} }
if (IsEqualGUID(riid, &IID_IUnknown) if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|| IsEqualGUID(riid, &IID_IWineD3DResource) || IsEqualGUID(riid, &IID_IWineD3DResource)
|| IsEqualGUID(riid, &IID_IWineD3DSurface)) { || IsEqualGUID(riid, &IID_IWineD3DSurface)) {
IUnknown_AddRef((IUnknown*)iface); IUnknown_AddRef((IUnknown*)iface);
......
...@@ -67,6 +67,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_QueryInterface(IWineD3DSwapChain *iface, RE ...@@ -67,6 +67,7 @@ HRESULT WINAPI IWineD3DSwapChainImpl_QueryInterface(IWineD3DSwapChain *iface, RE
IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface; IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface;
TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(riid), ppobj); TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(riid), ppobj);
if (IsEqualGUID(riid, &IID_IUnknown) if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|| IsEqualGUID(riid, &IID_IWineD3DSwapChain)){ || IsEqualGUID(riid, &IID_IWineD3DSwapChain)){
IWineD3DSwapChainImpl_AddRef(iface); IWineD3DSwapChainImpl_AddRef(iface);
if(ppobj == NULL){ if(ppobj == NULL){
......
...@@ -34,6 +34,7 @@ HRESULT WINAPI IWineD3DTextureImpl_QueryInterface(IWineD3DTexture *iface, REFIID ...@@ -34,6 +34,7 @@ HRESULT WINAPI IWineD3DTextureImpl_QueryInterface(IWineD3DTexture *iface, REFIID
IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface; IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj); TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
if (IsEqualGUID(riid, &IID_IUnknown) if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|| IsEqualGUID(riid, &IID_IWineD3DResource) || IsEqualGUID(riid, &IID_IWineD3DResource)
|| IsEqualGUID(riid, &IID_IWineD3DBaseTexture) || IsEqualGUID(riid, &IID_IWineD3DBaseTexture)
|| IsEqualGUID(riid, &IID_IWineD3DTexture)){ || IsEqualGUID(riid, &IID_IWineD3DTexture)){
......
...@@ -34,6 +34,7 @@ HRESULT WINAPI IWineD3DVertexBufferImpl_QueryInterface(IWineD3DVertexBuffer *ifa ...@@ -34,6 +34,7 @@ HRESULT WINAPI IWineD3DVertexBufferImpl_QueryInterface(IWineD3DVertexBuffer *ifa
IWineD3DVertexBufferImpl *This = (IWineD3DVertexBufferImpl *)iface; IWineD3DVertexBufferImpl *This = (IWineD3DVertexBufferImpl *)iface;
TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj); TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
if (IsEqualGUID(riid, &IID_IUnknown) if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|| IsEqualGUID(riid, &IID_IWineD3DResource) || IsEqualGUID(riid, &IID_IWineD3DResource)
|| IsEqualGUID(riid, &IID_IWineD3DVertexBuffer)){ || IsEqualGUID(riid, &IID_IWineD3DVertexBuffer)){
IUnknown_AddRef(iface); IUnknown_AddRef(iface);
......
...@@ -398,6 +398,7 @@ HRESULT WINAPI IWineD3DVertexDeclarationImpl_QueryInterface(IWineD3DVertexDeclar ...@@ -398,6 +398,7 @@ HRESULT WINAPI IWineD3DVertexDeclarationImpl_QueryInterface(IWineD3DVertexDeclar
IWineD3DVertexDeclarationImpl *This = (IWineD3DVertexDeclarationImpl *)iface; IWineD3DVertexDeclarationImpl *This = (IWineD3DVertexDeclarationImpl *)iface;
TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj); TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
if (IsEqualGUID(riid, &IID_IUnknown) if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|| IsEqualGUID(riid, &IID_IWineD3DVertexDeclaration)){ || IsEqualGUID(riid, &IID_IWineD3DVertexDeclaration)){
IUnknown_AddRef(iface); IUnknown_AddRef(iface);
*ppobj = This; *ppobj = This;
......
...@@ -1980,6 +1980,7 @@ HRESULT WINAPI IWineD3DVertexShaderImpl_QueryInterface(IWineD3DVertexShader *ifa ...@@ -1980,6 +1980,7 @@ HRESULT WINAPI IWineD3DVertexShaderImpl_QueryInterface(IWineD3DVertexShader *ifa
IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface; IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface;
TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj); TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
if (IsEqualGUID(riid, &IID_IUnknown) if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|| IsEqualGUID(riid, &IID_IWineD3DVertexShader)) { || IsEqualGUID(riid, &IID_IWineD3DVertexShader)) {
IUnknown_AddRef(iface); IUnknown_AddRef(iface);
*ppobj = This; *ppobj = This;
......
...@@ -34,6 +34,7 @@ HRESULT WINAPI IWineD3DVolumeImpl_QueryInterface(IWineD3DVolume *iface, REFIID r ...@@ -34,6 +34,7 @@ HRESULT WINAPI IWineD3DVolumeImpl_QueryInterface(IWineD3DVolume *iface, REFIID r
IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface; IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface;
TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj); TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
if (IsEqualGUID(riid, &IID_IUnknown) if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|| IsEqualGUID(riid, &IID_IWineD3DVolume)){ || IsEqualGUID(riid, &IID_IWineD3DVolume)){
IUnknown_AddRef(iface); IUnknown_AddRef(iface);
*ppobj = This; *ppobj = This;
......
...@@ -34,6 +34,7 @@ HRESULT WINAPI IWineD3DVolumeTextureImpl_QueryInterface(IWineD3DVolumeTexture *i ...@@ -34,6 +34,7 @@ HRESULT WINAPI IWineD3DVolumeTextureImpl_QueryInterface(IWineD3DVolumeTexture *i
IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface; IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface;
TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj); TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
if (IsEqualGUID(riid, &IID_IUnknown) if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|| IsEqualGUID(riid, &IID_IWineD3DResource) || IsEqualGUID(riid, &IID_IWineD3DResource)
|| IsEqualGUID(riid, &IID_IWineD3DBaseTexture) || IsEqualGUID(riid, &IID_IWineD3DBaseTexture)
|| IsEqualGUID(riid, &IID_IWineD3DVolumeTexture)) { || IsEqualGUID(riid, &IID_IWineD3DVolumeTexture)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment