d3drm: Avoid LPDIRECT3DRMDEVICE.
This commit is contained in:
parent
9eae7aed1b
commit
4e1bac56b5
|
@ -231,13 +231,12 @@ static HRESULT WINAPI IDirect3DRMImpl_CreateMaterial(IDirect3DRM* iface, D3DVALU
|
|||
return IDirect3DRM3_CreateMaterial(&This->IDirect3DRM3_iface, power, (LPDIRECT3DRMMATERIAL2*)material);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3DRMImpl_CreateDevice(IDirect3DRM* iface, DWORD width, DWORD height, LPDIRECT3DRMDEVICE * ppDevice)
|
||||
static HRESULT WINAPI IDirect3DRMImpl_CreateDevice(IDirect3DRM *iface,
|
||||
DWORD width, DWORD height, IDirect3DRMDevice **device)
|
||||
{
|
||||
IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface);
|
||||
FIXME("iface %p, width %u, height %u, device %p partial stub!\n", iface, width, height, device);
|
||||
|
||||
FIXME("(%p/%p)->(%u,%u,%p): partial stub\n", iface, This, width, height, ppDevice);
|
||||
|
||||
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice, (IUnknown**)ppDevice);
|
||||
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice, (IUnknown **)device);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3DRMImpl_CreateDeviceFromSurface(IDirect3DRM *iface, GUID *pGUID,
|
||||
|
@ -292,14 +291,13 @@ static HRESULT WINAPI IDirect3DRMImpl_CreateShadow(IDirect3DRM* iface, LPDIRECT3
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3DRMImpl_CreateViewport(IDirect3DRM* iface, LPDIRECT3DRMDEVICE pDevice, LPDIRECT3DRMFRAME pFrame, DWORD xpos, DWORD ypos, DWORD width, DWORD height, LPDIRECT3DRMVIEWPORT * ppViewport)
|
||||
static HRESULT WINAPI IDirect3DRMImpl_CreateViewport(IDirect3DRM *iface, IDirect3DRMDevice *device,
|
||||
IDirect3DRMFrame *camera, DWORD x, DWORD y, DWORD width, DWORD height, IDirect3DRMViewport **viewport)
|
||||
{
|
||||
IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface);
|
||||
FIXME("iface %p, device %p, camera %p, x %u, y %u, width %u, height %u, viewport %p partial stub!\n",
|
||||
iface, device, camera, x, y, width, height, viewport);
|
||||
|
||||
FIXME("(%p/%p)->(%p,%p,%d,%d,%d,%d,%p): partial stub\n", iface, This, pDevice, pFrame,
|
||||
xpos, ypos, width, height, ppViewport);
|
||||
|
||||
return Direct3DRMViewport_create(&IID_IDirect3DRMViewport, (IUnknown**)ppViewport);
|
||||
return Direct3DRMViewport_create(&IID_IDirect3DRMViewport, (IUnknown **)viewport);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3DRMImpl_CreateWrap(IDirect3DRM* iface, D3DRMWRAPTYPE type, LPDIRECT3DRMFRAME pFrame, D3DVALUE ox, D3DVALUE oy, D3DVALUE oz, D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, D3DVALUE ux, D3DVALUE uy, D3DVALUE uz, D3DVALUE ou, D3DVALUE ov, D3DVALUE su, D3DVALUE sv, LPDIRECT3DRMWRAP * ppWrap)
|
||||
|
@ -675,19 +673,13 @@ static HRESULT WINAPI IDirect3DRM2Impl_CreateShadow(IDirect3DRM2* iface, LPDIREC
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3DRM2Impl_CreateViewport(IDirect3DRM2* iface,
|
||||
LPDIRECT3DRMDEVICE pDevice,
|
||||
LPDIRECT3DRMFRAME pFrame,
|
||||
DWORD xpos, DWORD ypos,
|
||||
DWORD width, DWORD height,
|
||||
LPDIRECT3DRMVIEWPORT * ppViewport)
|
||||
static HRESULT WINAPI IDirect3DRM2Impl_CreateViewport(IDirect3DRM2 *iface, IDirect3DRMDevice *device,
|
||||
IDirect3DRMFrame *camera, DWORD x, DWORD y, DWORD width, DWORD height, IDirect3DRMViewport **viewport)
|
||||
{
|
||||
IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface);
|
||||
FIXME("iface %p, device %p, camera %p, x %u, y %u, width %u, height %u, viewport %p partial stub!\n",
|
||||
iface, device, camera, x, y, width, height, viewport);
|
||||
|
||||
FIXME("(%p/%p)->(%p,%p,%d,%d,%d,%d,%p): partial stub\n", iface, This, pDevice, pFrame,
|
||||
xpos, ypos, width, height, ppViewport);
|
||||
|
||||
return Direct3DRMViewport_create(&IID_IDirect3DRMViewport, (IUnknown**)ppViewport);
|
||||
return Direct3DRMViewport_create(&IID_IDirect3DRMViewport, (IUnknown **)viewport);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3DRM2Impl_CreateWrap(IDirect3DRM2* iface, D3DRMWRAPTYPE type,
|
||||
|
|
|
@ -1006,7 +1006,7 @@ static void test_Viewport(void)
|
|||
IDirectDrawClipper *pClipper;
|
||||
HRESULT hr;
|
||||
IDirect3DRM *d3drm;
|
||||
LPDIRECT3DRMDEVICE pDevice;
|
||||
IDirect3DRMDevice *device;
|
||||
LPDIRECT3DRMFRAME pFrame;
|
||||
LPDIRECT3DRMVIEWPORT pViewport;
|
||||
GUID driver;
|
||||
|
@ -1028,13 +1028,13 @@ static void test_Viewport(void)
|
|||
ok(hr == DD_OK, "Cannot set HWnd to Clipper (hr = %x)\n", hr);
|
||||
|
||||
memcpy(&driver, &IID_IDirect3DRGBDevice, sizeof(GUID));
|
||||
hr = IDirect3DRM3_CreateDeviceFromClipper(d3drm, pClipper, &driver, rc.right, rc.bottom, &pDevice);
|
||||
hr = IDirect3DRM3_CreateDeviceFromClipper(d3drm, pClipper, &driver, rc.right, rc.bottom, &device);
|
||||
ok(hr == D3DRM_OK, "Cannot get IDirect3DRMDevice interface (hr = %x)\n", hr);
|
||||
|
||||
hr = IDirect3DRM_CreateFrame(d3drm, NULL, &pFrame);
|
||||
ok(hr == D3DRM_OK, "Cannot get IDirect3DRMFrame interface (hr = %x)\n", hr);
|
||||
|
||||
hr = IDirect3DRM_CreateViewport(d3drm, pDevice, pFrame, rc.left, rc.top, rc.right, rc.bottom, &pViewport);
|
||||
hr = IDirect3DRM_CreateViewport(d3drm, device, pFrame, rc.left, rc.top, rc.right, rc.bottom, &pViewport);
|
||||
ok(hr == D3DRM_OK, "Cannot get IDirect3DRMViewport interface (hr = %x)\n", hr);
|
||||
|
||||
hr = IDirect3DRMViewport_GetClassName(pViewport, NULL, cname);
|
||||
|
@ -1052,7 +1052,7 @@ static void test_Viewport(void)
|
|||
|
||||
IDirect3DRMViewport_Release(pViewport);
|
||||
IDirect3DRMFrame_Release(pFrame);
|
||||
IDirect3DRMDevice_Release(pDevice);
|
||||
IDirect3DRMDevice_Release(device);
|
||||
IDirectDrawClipper_Release(pClipper);
|
||||
|
||||
IDirect3DRM_Release(d3drm);
|
||||
|
@ -1238,7 +1238,7 @@ static void test_Device(void)
|
|||
IDirectDrawClipper *pClipper;
|
||||
HRESULT hr;
|
||||
IDirect3DRM *d3drm;
|
||||
LPDIRECT3DRMDEVICE pDevice;
|
||||
IDirect3DRMDevice *device;
|
||||
LPDIRECT3DRMWINDEVICE pWinDevice;
|
||||
GUID driver;
|
||||
HWND window;
|
||||
|
@ -1259,24 +1259,24 @@ static void test_Device(void)
|
|||
ok(hr == DD_OK, "Cannot set HWnd to Clipper (hr = %x)\n", hr);
|
||||
|
||||
memcpy(&driver, &IID_IDirect3DRGBDevice, sizeof(GUID));
|
||||
hr = IDirect3DRM3_CreateDeviceFromClipper(d3drm, pClipper, &driver, rc.right, rc.bottom, &pDevice);
|
||||
hr = IDirect3DRM3_CreateDeviceFromClipper(d3drm, pClipper, &driver, rc.right, rc.bottom, &device);
|
||||
ok(hr == D3DRM_OK, "Cannot get IDirect3DRMDevice interface (hr = %x)\n", hr);
|
||||
|
||||
hr = IDirect3DRMDevice_GetClassName(pDevice, NULL, cname);
|
||||
hr = IDirect3DRMDevice_GetClassName(device, NULL, cname);
|
||||
ok(hr == E_INVALIDARG, "GetClassName failed with %x\n", hr);
|
||||
hr = IDirect3DRMDevice_GetClassName(pDevice, NULL, NULL);
|
||||
hr = IDirect3DRMDevice_GetClassName(device, NULL, NULL);
|
||||
ok(hr == E_INVALIDARG, "GetClassName failed with %x\n", hr);
|
||||
size = 1;
|
||||
hr = IDirect3DRMDevice_GetClassName(pDevice, &size, cname);
|
||||
hr = IDirect3DRMDevice_GetClassName(device, &size, cname);
|
||||
ok(hr == E_INVALIDARG, "GetClassName failed with %x\n", hr);
|
||||
size = sizeof(cname);
|
||||
hr = IDirect3DRMDevice_GetClassName(pDevice, &size, cname);
|
||||
hr = IDirect3DRMDevice_GetClassName(device, &size, cname);
|
||||
ok(hr == D3DRM_OK, "Cannot get classname (hr = %x)\n", hr);
|
||||
ok(size == sizeof("Device"), "wrong size: %u\n", size);
|
||||
ok(!strcmp(cname, "Device"), "Expected cname to be \"Device\", but got \"%s\"\n", cname);
|
||||
|
||||
/* WinDevice */
|
||||
hr = IDirect3DRMDevice_QueryInterface(pDevice, &IID_IDirect3DRMWinDevice, (LPVOID*)&pWinDevice);
|
||||
hr = IDirect3DRMDevice_QueryInterface(device, &IID_IDirect3DRMWinDevice, (LPVOID*)&pWinDevice);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
win_skip("Cannot get IDirect3DRMWinDevice interface (hr = %x), skipping tests\n", hr);
|
||||
|
@ -1299,7 +1299,7 @@ static void test_Device(void)
|
|||
IDirect3DRMWinDevice_Release(pWinDevice);
|
||||
|
||||
cleanup:
|
||||
IDirect3DRMDevice_Release(pDevice);
|
||||
IDirect3DRMDevice_Release(device);
|
||||
IDirectDrawClipper_Release(pClipper);
|
||||
|
||||
IDirect3DRM_Release(d3drm);
|
||||
|
|
|
@ -187,15 +187,11 @@ static HRESULT WINAPI IDirect3DRMViewportImpl_GetClassName(IDirect3DRMViewport*
|
|||
}
|
||||
|
||||
/*** IDirect3DRMViewport methods ***/
|
||||
static HRESULT WINAPI IDirect3DRMViewportImpl_Init(IDirect3DRMViewport* iface,
|
||||
LPDIRECT3DRMDEVICE dev, LPDIRECT3DRMFRAME camera,
|
||||
DWORD xpos, DWORD ypos,
|
||||
DWORD width, DWORD height)
|
||||
static HRESULT WINAPI IDirect3DRMViewportImpl_Init(IDirect3DRMViewport *iface, IDirect3DRMDevice *device,
|
||||
IDirect3DRMFrame *camera, DWORD x, DWORD y, DWORD width, DWORD height)
|
||||
{
|
||||
IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
|
||||
|
||||
FIXME("(%p/%p)->(%p, %p, %u, %u, %u, %u): stub\n", iface, This, dev, camera,
|
||||
xpos, ypos, width, height);
|
||||
FIXME("iface %p, device %p, camera %p, x %u, y %u, width %u, height %u stub!\n",
|
||||
iface, device, camera, x, y, width, height);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
@ -336,12 +332,9 @@ static HRESULT WINAPI IDirect3DRMViewportImpl_GetCamera(IDirect3DRMViewport* ifa
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirect3DRMViewportImpl_GetDevice(IDirect3DRMViewport* iface,
|
||||
LPDIRECT3DRMDEVICE * device)
|
||||
static HRESULT WINAPI IDirect3DRMViewportImpl_GetDevice(IDirect3DRMViewport *iface, IDirect3DRMDevice **device)
|
||||
{
|
||||
IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface);
|
||||
|
||||
FIXME("(%p/%p)->(%p): stub\n", iface, This, device);
|
||||
FIXME("iface %p, device %p stub!\n", iface, device);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ DECLARE_INTERFACE_(IDirect3DRM,IUnknown)
|
|||
STDMETHOD(CreateLight)(THIS_ D3DRMLIGHTTYPE, D3DCOLOR, LPDIRECT3DRMLIGHT *) PURE;
|
||||
STDMETHOD(CreateLightRGB)(THIS_ D3DRMLIGHTTYPE, D3DVALUE, D3DVALUE, D3DVALUE, LPDIRECT3DRMLIGHT *) PURE;
|
||||
STDMETHOD(CreateMaterial)(THIS_ D3DVALUE, LPDIRECT3DRMMATERIAL *) PURE;
|
||||
STDMETHOD(CreateDevice)(THIS_ DWORD, DWORD, LPDIRECT3DRMDEVICE *) PURE;
|
||||
STDMETHOD(CreateDevice)(THIS_ DWORD width, DWORD height, IDirect3DRMDevice **device) PURE;
|
||||
STDMETHOD(CreateDeviceFromSurface)(THIS_ GUID *guid, IDirectDraw *ddraw,
|
||||
IDirectDrawSurface *surface, IDirect3DRMDevice **device) PURE;
|
||||
STDMETHOD(CreateDeviceFromD3D)(THIS_ IDirect3D *d3d, IDirect3DDevice *d3d_device,
|
||||
|
@ -79,8 +79,8 @@ DECLARE_INTERFACE_(IDirect3DRM,IUnknown)
|
|||
IDirect3DRMTexture **texture) PURE;
|
||||
STDMETHOD(CreateShadow)(THIS_ LPDIRECT3DRMVISUAL, LPDIRECT3DRMLIGHT, D3DVALUE px, D3DVALUE py, D3DVALUE pz,
|
||||
D3DVALUE nx, D3DVALUE ny, D3DVALUE nz, LPDIRECT3DRMVISUAL *) PURE;
|
||||
STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DRMDEVICE, LPDIRECT3DRMFRAME, DWORD, DWORD, DWORD, DWORD,
|
||||
LPDIRECT3DRMVIEWPORT *) PURE;
|
||||
STDMETHOD(CreateViewport)(THIS_ IDirect3DRMDevice *device, IDirect3DRMFrame *camera,
|
||||
DWORD x, DWORD y, DWORD width, DWORD height, IDirect3DRMViewport **viewport) PURE;
|
||||
STDMETHOD(CreateWrap)(THIS_ D3DRMWRAPTYPE, LPDIRECT3DRMFRAME, D3DVALUE ox, D3DVALUE oy, D3DVALUE oz,
|
||||
D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, D3DVALUE ux, D3DVALUE uy, D3DVALUE uz, D3DVALUE ou, D3DVALUE ov,
|
||||
D3DVALUE su, D3DVALUE sv, LPDIRECT3DRMWRAP *) PURE;
|
||||
|
@ -215,8 +215,8 @@ DECLARE_INTERFACE_(IDirect3DRM2,IUnknown)
|
|||
IDirect3DRMTexture2 **texture) PURE;
|
||||
STDMETHOD(CreateShadow)(THIS_ LPDIRECT3DRMVISUAL, LPDIRECT3DRMLIGHT, D3DVALUE px, D3DVALUE py, D3DVALUE pz,
|
||||
D3DVALUE nx, D3DVALUE ny, D3DVALUE nz, LPDIRECT3DRMVISUAL *) PURE;
|
||||
STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DRMDEVICE, LPDIRECT3DRMFRAME, DWORD, DWORD, DWORD, DWORD,
|
||||
LPDIRECT3DRMVIEWPORT *) PURE;
|
||||
STDMETHOD(CreateViewport)(THIS_ IDirect3DRMDevice *device, IDirect3DRMFrame *camera,
|
||||
DWORD x, DWORD y, DWORD width, DWORD height, IDirect3DRMViewport **viewport) PURE;
|
||||
STDMETHOD(CreateWrap)(THIS_ D3DRMWRAPTYPE, LPDIRECT3DRMFRAME, D3DVALUE ox, D3DVALUE oy, D3DVALUE oz,
|
||||
D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, D3DVALUE ux, D3DVALUE uy, D3DVALUE uz, D3DVALUE ou, D3DVALUE ov,
|
||||
D3DVALUE su, D3DVALUE sv, LPDIRECT3DRMWRAP *) PURE;
|
||||
|
|
|
@ -160,8 +160,8 @@ typedef void (__cdecl *D3DRMFRAME3MOVECALLBACK)(LPDIRECT3DRMFRAME3 obj, LPVOID a
|
|||
typedef void (__cdecl *D3DRMUPDATECALLBACK)(struct IDirect3DRMDevice *device, void *ctx, int count, D3DRECT *rects);
|
||||
typedef void (__cdecl *D3DRMDEVICE3UPDATECALLBACK)(struct IDirect3DRMDevice3 *device, void *ctx,
|
||||
int count, D3DRECT *rects);
|
||||
typedef int (__cdecl *D3DRMUSERVISUALCALLBACK)(LPDIRECT3DRMUSERVISUAL obj, LPVOID arg,
|
||||
D3DRMUSERVISUALREASON reason, LPDIRECT3DRMDEVICE dev, LPDIRECT3DRMVIEWPORT view);
|
||||
typedef int (__cdecl *D3DRMUSERVISUALCALLBACK)(struct IDirect3DRMUserVisual *visual, void *ctx,
|
||||
D3DRMUSERVISUALREASON reason, struct IDirect3DRMDevice *device, struct IDirect3DRMViewport *viewport);
|
||||
typedef HRESULT (__cdecl *D3DRMLOADTEXTURECALLBACK)(char *tex_name, void *arg, LPDIRECT3DRMTEXTURE *);
|
||||
typedef HRESULT (__cdecl *D3DRMLOADTEXTURE3CALLBACK)(char *tex_name, void *arg, LPDIRECT3DRMTEXTURE3 *);
|
||||
typedef void (__cdecl *D3DRMLOADCALLBACK)(struct IDirect3DRMObject *object, REFIID objectguid, void *arg);
|
||||
|
@ -808,8 +808,8 @@ DECLARE_INTERFACE_(IDirect3DRMViewport,IDirect3DRMObject)
|
|||
STDMETHOD(GetName)(THIS_ LPDWORD lpdwSize, LPSTR lpName) PURE;
|
||||
STDMETHOD(GetClassName)(THIS_ LPDWORD lpdwSize, LPSTR lpName) PURE;
|
||||
/*** IDirect3DRMViewport methods ***/
|
||||
STDMETHOD(Init) (THIS_ LPDIRECT3DRMDEVICE dev, LPDIRECT3DRMFRAME camera, DWORD xpos, DWORD ypos,
|
||||
DWORD width, DWORD height) PURE;
|
||||
STDMETHOD(Init) (THIS_ IDirect3DRMDevice *device, struct IDirect3DRMFrame *camera,
|
||||
DWORD x, DWORD y, DWORD width, DWORD height) PURE;
|
||||
STDMETHOD(Clear)(THIS) PURE;
|
||||
STDMETHOD(Render)(THIS_ LPDIRECT3DRMFRAME) PURE;
|
||||
STDMETHOD(SetFront)(THIS_ D3DVALUE) PURE;
|
||||
|
@ -824,7 +824,7 @@ DECLARE_INTERFACE_(IDirect3DRMViewport,IDirect3DRMObject)
|
|||
STDMETHOD(ForceUpdate)(THIS_ DWORD x1, DWORD y1, DWORD x2, DWORD y2) PURE;
|
||||
STDMETHOD(SetPlane)(THIS_ D3DVALUE left, D3DVALUE right, D3DVALUE bottom, D3DVALUE top) PURE;
|
||||
STDMETHOD(GetCamera)(THIS_ LPDIRECT3DRMFRAME *) PURE;
|
||||
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DRMDEVICE *) PURE;
|
||||
STDMETHOD(GetDevice)(THIS_ IDirect3DRMDevice **device) PURE;
|
||||
STDMETHOD(GetPlane)(THIS_ D3DVALUE *left, D3DVALUE *right, D3DVALUE *bottom, D3DVALUE *top) PURE;
|
||||
STDMETHOD(Pick)(THIS_ LONG x, LONG y, LPDIRECT3DRMPICKEDARRAY *return_visuals) PURE;
|
||||
STDMETHOD_(BOOL, GetUniformScaling)(THIS) PURE;
|
||||
|
@ -4219,7 +4219,7 @@ DECLARE_INTERFACE_(IDirect3DRMDeviceArray, IDirect3DRMArray)
|
|||
/*** IDirect3DRMArray methods ***/
|
||||
STDMETHOD_(DWORD, GetSize)(THIS) PURE;
|
||||
/*** IDirect3DRMDeviceArray methods ***/
|
||||
STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMDEVICE *) PURE;
|
||||
STDMETHOD(GetElement)(THIS_ DWORD index, IDirect3DRMDevice **element) PURE;
|
||||
};
|
||||
#undef INTERFACE
|
||||
|
||||
|
|
Loading…
Reference in New Issue