76 lines
2.5 KiB
C
76 lines
2.5 KiB
C
/*
|
|
* IWineD3DDevice implementation
|
|
*
|
|
* Copyright 2002-2004 Jason Edmeades
|
|
* Copyright 2003-2004 Raphael Junqueira
|
|
* Copyright 2004 Christian Costa
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*/
|
|
|
|
#include "config.h"
|
|
#include "wined3d_private.h"
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
|
WINE_DECLARE_DEBUG_CHANNEL(d3d_caps);
|
|
|
|
/**********************************************************
|
|
* Utility functions follow
|
|
**********************************************************/
|
|
|
|
|
|
/**********************************************************
|
|
* IWineD3DDevice implementation follows
|
|
**********************************************************/
|
|
|
|
|
|
/**********************************************************
|
|
* IUnknown parts follows
|
|
**********************************************************/
|
|
|
|
HRESULT WINAPI IWineD3DDeviceImpl_QueryInterface(IWineD3DDevice *iface,REFIID riid,LPVOID *ppobj)
|
|
{
|
|
return E_NOINTERFACE;
|
|
}
|
|
|
|
ULONG WINAPI IWineD3DDeviceImpl_AddRef(IWineD3DDevice *iface) {
|
|
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
|
FIXME("(%p) : AddRef increasing from %ld\n", This, This->ref);
|
|
return InterlockedIncrement(&This->ref);
|
|
}
|
|
|
|
ULONG WINAPI IWineD3DDeviceImpl_Release(IWineD3DDevice *iface) {
|
|
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
|
ULONG ref;
|
|
TRACE("(%p) : Releasing from %ld\n", This, This->ref);
|
|
ref = InterlockedDecrement(&This->ref);
|
|
if (ref == 0) {
|
|
IWineD3D_Release(This->WineD3D);
|
|
HeapFree(GetProcessHeap(), 0, This);
|
|
}
|
|
return ref;
|
|
}
|
|
|
|
/**********************************************************
|
|
* IWineD3DDevice VTbl follows
|
|
**********************************************************/
|
|
|
|
IWineD3DDeviceVtbl IWineD3DDevice_Vtbl =
|
|
{
|
|
IWineD3DDeviceImpl_QueryInterface,
|
|
IWineD3DDeviceImpl_AddRef,
|
|
IWineD3DDeviceImpl_Release
|
|
};
|