mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
d3d9: Add an IDirect3D9Ex stub.
This commit is contained in:
parent
069b9c8c1c
commit
d9f9725993
@ -139,7 +139,7 @@ extern CRITICAL_SECTION d3d9_cs;
|
||||
/*****************************************************************************
|
||||
* Predeclare the interface implementation structures
|
||||
*/
|
||||
extern const IDirect3D9Vtbl Direct3D9_Vtbl;
|
||||
extern const IDirect3D9ExVtbl Direct3D9_Vtbl;
|
||||
|
||||
/*****************************************************************************
|
||||
* IDirect3D implementation structure
|
||||
@ -147,7 +147,7 @@ extern const IDirect3D9Vtbl Direct3D9_Vtbl;
|
||||
typedef struct IDirect3D9Impl
|
||||
{
|
||||
/* IUnknown fields */
|
||||
const IDirect3D9Vtbl *lpVtbl;
|
||||
const IDirect3D9ExVtbl *lpVtbl;
|
||||
LONG ref;
|
||||
|
||||
/* The WineD3D device */
|
||||
|
@ -25,7 +25,7 @@
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
|
||||
|
||||
/* IDirect3D9 IUnknown parts follow: */
|
||||
static HRESULT WINAPI IDirect3D9Impl_QueryInterface(LPDIRECT3D9 iface, REFIID riid, LPVOID* ppobj)
|
||||
static HRESULT WINAPI IDirect3D9Impl_QueryInterface(LPDIRECT3D9EX iface, REFIID riid, LPVOID* ppobj)
|
||||
{
|
||||
IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
|
||||
|
||||
@ -33,7 +33,12 @@ static HRESULT WINAPI IDirect3D9Impl_QueryInterface(LPDIRECT3D9 iface, REFIID ri
|
||||
|| IsEqualGUID(riid, &IID_IDirect3D9)) {
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
TRACE("Returning IDirect3D9 interface at %p\n", *ppobj);
|
||||
return S_OK;
|
||||
} else if(IsEqualGUID(riid, &IID_IDirect3D9Ex)) {
|
||||
*ppobj = (IDirect3D9Ex *) This;
|
||||
TRACE("Returning IDirect3D9Ex interface at %p\n", *ppobj);
|
||||
IDirect3D9Ex_AddRef((IDirect3D9Ex *)*ppobj);
|
||||
}
|
||||
|
||||
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
|
||||
@ -41,7 +46,7 @@ static HRESULT WINAPI IDirect3D9Impl_QueryInterface(LPDIRECT3D9 iface, REFIID ri
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static ULONG WINAPI IDirect3D9Impl_AddRef(LPDIRECT3D9 iface) {
|
||||
static ULONG WINAPI IDirect3D9Impl_AddRef(LPDIRECT3D9EX iface) {
|
||||
IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
|
||||
ULONG ref = InterlockedIncrement(&This->ref);
|
||||
|
||||
@ -50,7 +55,7 @@ static ULONG WINAPI IDirect3D9Impl_AddRef(LPDIRECT3D9 iface) {
|
||||
return ref;
|
||||
}
|
||||
|
||||
static ULONG WINAPI IDirect3D9Impl_Release(LPDIRECT3D9 iface) {
|
||||
static ULONG WINAPI IDirect3D9Impl_Release(LPDIRECT3D9EX iface) {
|
||||
IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
|
||||
ULONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
@ -67,7 +72,7 @@ static ULONG WINAPI IDirect3D9Impl_Release(LPDIRECT3D9 iface) {
|
||||
}
|
||||
|
||||
/* IDirect3D9 Interface follow: */
|
||||
static HRESULT WINAPI IDirect3D9Impl_RegisterSoftwareDevice(LPDIRECT3D9 iface, void* pInitializeFunction) {
|
||||
static HRESULT WINAPI IDirect3D9Impl_RegisterSoftwareDevice(LPDIRECT3D9EX iface, void* pInitializeFunction) {
|
||||
IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
|
||||
HRESULT hr;
|
||||
TRACE("(%p)->(%p)\n", This, pInitializeFunction);
|
||||
@ -78,7 +83,7 @@ static HRESULT WINAPI IDirect3D9Impl_RegisterSoftwareDevice(LPDIRECT3D9 iface,
|
||||
return hr;
|
||||
}
|
||||
|
||||
static UINT WINAPI IDirect3D9Impl_GetAdapterCount(LPDIRECT3D9 iface) {
|
||||
static UINT WINAPI IDirect3D9Impl_GetAdapterCount(LPDIRECT3D9EX iface) {
|
||||
IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
|
||||
HRESULT hr;
|
||||
TRACE("%p\n", This);
|
||||
@ -89,7 +94,7 @@ static UINT WINAPI IDirect3D9Impl_GetAdapterCount(LPDIRECT3D9 iface) {
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3D9Impl_GetAdapterIdentifier(LPDIRECT3D9 iface, UINT Adapter, DWORD Flags, D3DADAPTER_IDENTIFIER9* pIdentifier) {
|
||||
static HRESULT WINAPI IDirect3D9Impl_GetAdapterIdentifier(LPDIRECT3D9EX iface, UINT Adapter, DWORD Flags, D3DADAPTER_IDENTIFIER9* pIdentifier) {
|
||||
IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
|
||||
WINED3DADAPTER_IDENTIFIER adapter_id;
|
||||
HRESULT hr;
|
||||
@ -114,7 +119,7 @@ static HRESULT WINAPI IDirect3D9Impl_GetAdapterIdentifier(LPDIRECT3D9 iface, UIN
|
||||
return hr;
|
||||
}
|
||||
|
||||
static UINT WINAPI IDirect3D9Impl_GetAdapterModeCount(LPDIRECT3D9 iface, UINT Adapter, D3DFORMAT Format) {
|
||||
static UINT WINAPI IDirect3D9Impl_GetAdapterModeCount(LPDIRECT3D9EX iface, UINT Adapter, D3DFORMAT Format) {
|
||||
IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
|
||||
HRESULT hr;
|
||||
TRACE("(%p)->(%d, %d\n", This, Adapter, Format);
|
||||
@ -130,7 +135,7 @@ static UINT WINAPI IDirect3D9Impl_GetAdapterModeCount(LPDIRECT3D9 iface, UINT Ad
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3D9Impl_EnumAdapterModes(LPDIRECT3D9 iface, UINT Adapter, D3DFORMAT Format, UINT Mode, D3DDISPLAYMODE* pMode) {
|
||||
static HRESULT WINAPI IDirect3D9Impl_EnumAdapterModes(LPDIRECT3D9EX iface, UINT Adapter, D3DFORMAT Format, UINT Mode, D3DDISPLAYMODE* pMode) {
|
||||
IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
|
||||
HRESULT hr;
|
||||
TRACE("(%p)->(%d, %d, %d, %p)\n", This, Adapter, Format, Mode, pMode);
|
||||
@ -145,12 +150,12 @@ static HRESULT WINAPI IDirect3D9Impl_EnumAdapterModes(LPDIRECT3D9 iface, UINT Ad
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3D9Impl_GetAdapterDisplayMode(LPDIRECT3D9 iface, UINT Adapter, D3DDISPLAYMODE* pMode) {
|
||||
static HRESULT WINAPI IDirect3D9Impl_GetAdapterDisplayMode(LPDIRECT3D9EX iface, UINT Adapter, D3DDISPLAYMODE* pMode) {
|
||||
IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
|
||||
return IWineD3D_GetAdapterDisplayMode(This->WineD3D, Adapter, (WINED3DDISPLAYMODE *) pMode);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3D9Impl_CheckDeviceType(LPDIRECT3D9 iface,
|
||||
static HRESULT WINAPI IDirect3D9Impl_CheckDeviceType(LPDIRECT3D9EX iface,
|
||||
UINT Adapter, D3DDEVTYPE CheckType, D3DFORMAT DisplayFormat,
|
||||
D3DFORMAT BackBufferFormat, BOOL Windowed) {
|
||||
IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
|
||||
@ -165,7 +170,7 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDeviceType(LPDIRECT3D9 iface,
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormat(LPDIRECT3D9 iface,
|
||||
static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormat(LPDIRECT3D9EX iface,
|
||||
UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat,
|
||||
DWORD Usage, D3DRESOURCETYPE RType, D3DFORMAT CheckFormat) {
|
||||
IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
|
||||
@ -179,7 +184,7 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormat(LPDIRECT3D9 iface,
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3D9Impl_CheckDeviceMultiSampleType(LPDIRECT3D9 iface,
|
||||
static HRESULT WINAPI IDirect3D9Impl_CheckDeviceMultiSampleType(LPDIRECT3D9EX iface,
|
||||
UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat,
|
||||
BOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType, DWORD* pQualityLevels) {
|
||||
IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
|
||||
@ -193,7 +198,7 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDeviceMultiSampleType(LPDIRECT3D9 ifac
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3D9Impl_CheckDepthStencilMatch(LPDIRECT3D9 iface,
|
||||
static HRESULT WINAPI IDirect3D9Impl_CheckDepthStencilMatch(LPDIRECT3D9EX iface,
|
||||
UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat,
|
||||
D3DFORMAT RenderTargetFormat, D3DFORMAT DepthStencilFormat) {
|
||||
IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
|
||||
@ -207,7 +212,7 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDepthStencilMatch(LPDIRECT3D9 iface,
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormatConversion(LPDIRECT3D9 iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SourceFormat, D3DFORMAT TargetFormat) {
|
||||
static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormatConversion(LPDIRECT3D9EX iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SourceFormat, D3DFORMAT TargetFormat) {
|
||||
IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
|
||||
HRESULT hr;
|
||||
TRACE("%p\n", This);
|
||||
@ -276,7 +281,7 @@ void filter_caps(D3DCAPS9* pCaps)
|
||||
D3DPTEXTURECAPS_CUBEMAP_POW2 | D3DPTEXTURECAPS_VOLUMEMAP_POW2| D3DPTEXTURECAPS_NOPROJECTEDBUMPENV;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3D9Impl_GetDeviceCaps(LPDIRECT3D9 iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DCAPS9* pCaps) {
|
||||
static HRESULT WINAPI IDirect3D9Impl_GetDeviceCaps(LPDIRECT3D9EX iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DCAPS9* pCaps) {
|
||||
IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
|
||||
HRESULT hrc = D3D_OK;
|
||||
WINED3DCAPS *pWineCaps;
|
||||
@ -306,7 +311,7 @@ static HRESULT WINAPI IDirect3D9Impl_GetDeviceCaps(LPDIRECT3D9 iface, UINT Adapt
|
||||
return hrc;
|
||||
}
|
||||
|
||||
static HMONITOR WINAPI IDirect3D9Impl_GetAdapterMonitor(LPDIRECT3D9 iface, UINT Adapter) {
|
||||
static HMONITOR WINAPI IDirect3D9Impl_GetAdapterMonitor(LPDIRECT3D9EX iface, UINT Adapter) {
|
||||
IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
|
||||
HMONITOR ret;
|
||||
TRACE("%p\n", This);
|
||||
@ -447,7 +452,7 @@ ULONG WINAPI D3D9CB_DestroyDepthStencilSurface(IWineD3DSurface *pSurface) {
|
||||
return IDirect3DSurface9_Release((IDirect3DSurface9*) surfaceParent);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3D9Impl_CreateDevice(LPDIRECT3D9 iface, UINT Adapter, D3DDEVTYPE DeviceType,
|
||||
static HRESULT WINAPI IDirect3D9Impl_CreateDevice(LPDIRECT3D9EX iface, UINT Adapter, D3DDEVTYPE DeviceType,
|
||||
HWND hFocusWindow, DWORD BehaviourFlags,
|
||||
D3DPRESENT_PARAMETERS* pPresentationParameters,
|
||||
IDirect3DDevice9** ppReturnedDeviceInterface) {
|
||||
@ -540,9 +545,39 @@ static HRESULT WINAPI IDirect3D9Impl_CreateDevice(LPDIRECT3D9 iface, UINT Adapte
|
||||
return hr;
|
||||
}
|
||||
|
||||
static UINT WINAPI IDirect3D9ExImpl_GetAdapterModeCountEx(IDirect3D9Ex *iface, UINT Adapter, CONST D3DDISPLAYMODEFILTER *pFilter) {
|
||||
IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
|
||||
FIXME("(%p)->(%d, %p): Stub!\n", This, Adapter, pFilter);
|
||||
return D3DERR_DRIVERINTERNALERROR;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3D9ExImpl_EnumAdapterModesEx(IDirect3D9Ex *iface, UINT Adapter, CONST D3DDISPLAYMODEFILTER *pFilter, UINT Mode, D3DDISPLAYMODEEX* pMode) {
|
||||
IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
|
||||
FIXME("(%p)->(%d, %p, %p): Stub!\n", This, Adapter, pFilter, pMode);
|
||||
return D3DERR_DRIVERINTERNALERROR;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3D9ExImpl_GetAdapterDisplayModeEx(IDirect3D9Ex *iface, UINT Adapter, D3DDISPLAYMODEEX *pMode, D3DDISPLAYROTATION *pRotation) {
|
||||
IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
|
||||
FIXME("(%p)->(%d, %p, %p): Stub!\n", This, Adapter, pMode, pRotation);
|
||||
return D3DERR_DRIVERINTERNALERROR;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3D9ExImpl_CreateDeviceEx(IDirect3D9Ex *iface, UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* pPresentationParameters, D3DDISPLAYMODEEX* pFullscreenDisplayMode, struct IDirect3DDevice9Ex **ppReturnedDeviceInterface) {
|
||||
IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
|
||||
FIXME("(%p)->(%d, %d, %p, 0x%08x, %p, %p, %p): Stub!\n", This, Adapter, DeviceType, hFocusWindow, BehaviorFlags, pPresentationParameters, pFullscreenDisplayMode, ppReturnedDeviceInterface);
|
||||
*ppReturnedDeviceInterface = NULL;
|
||||
return D3DERR_DRIVERINTERNALERROR;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3D9ExImpl_GetAdapterLUID(IDirect3D9Ex *iface, UINT Adapter, LUID *pLUID) {
|
||||
IDirect3D9Impl *This = (IDirect3D9Impl *)iface;
|
||||
FIXME("(%p)->(%d, %p)\n", This, Adapter, pLUID);
|
||||
return D3DERR_DRIVERINTERNALERROR;
|
||||
}
|
||||
|
||||
|
||||
const IDirect3D9Vtbl Direct3D9_Vtbl =
|
||||
const IDirect3D9ExVtbl Direct3D9_Vtbl =
|
||||
{
|
||||
/* IUnknown */
|
||||
IDirect3D9Impl_QueryInterface,
|
||||
@ -562,5 +597,12 @@ const IDirect3D9Vtbl Direct3D9_Vtbl =
|
||||
IDirect3D9Impl_CheckDeviceFormatConversion,
|
||||
IDirect3D9Impl_GetDeviceCaps,
|
||||
IDirect3D9Impl_GetAdapterMonitor,
|
||||
IDirect3D9Impl_CreateDevice
|
||||
IDirect3D9Impl_CreateDevice,
|
||||
/* IDirect3D9Ex */
|
||||
IDirect3D9ExImpl_GetAdapterModeCountEx,
|
||||
IDirect3D9ExImpl_EnumAdapterModesEx,
|
||||
IDirect3D9ExImpl_GetAdapterDisplayModeEx,
|
||||
IDirect3D9ExImpl_CreateDeviceEx,
|
||||
IDirect3D9ExImpl_GetAdapterLUID
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user