Commit 2944d233 authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

d3drm: Implement IDirect3DRMFrameX_DeleteLight.

parent cfa297e2
......@@ -505,9 +505,9 @@ static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteLight(IDirect3DRMFrame2* iface
{
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface);
FIXME("(%p/%p)->(%p): stub\n", iface, This, light);
TRACE("(%p/%p)->(%p)\n", iface, This, light);
return E_NOTIMPL;
return IDirect3DRMFrame3_DeleteLight(&This->IDirect3DRMFrame3_iface, light);
}
static HRESULT WINAPI IDirect3DRMFrame2Impl_DeleteMoveCallback(IDirect3DRMFrame2* iface,
......@@ -1466,10 +1466,26 @@ static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteLight(IDirect3DRMFrame3* iface
LPDIRECT3DRMLIGHT light)
{
IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame3(iface);
ULONG i;
FIXME("(%p/%p)->(%p): stub\n", iface, This, light);
TRACE("(%p/%p)->(%p)\n", iface, This, light);
return E_NOTIMPL;
if (!light)
return D3DRMERR_BADOBJECT;
/* Check if visual exists */
for (i = 0; i < This->nb_lights; i++)
if (This->lights[i] == light)
break;
if (i == This->nb_lights)
return D3DRMERR_BADVALUE;
memmove(This->lights + i, This->lights + i + 1, sizeof(IDirect3DRMLight*) * (This->nb_lights - 1 - i));
IDirect3DRMLight_Release(light);
This->nb_lights--;
return D3DRM_OK;
}
static HRESULT WINAPI IDirect3DRMFrame3Impl_DeleteMoveCallback(IDirect3DRMFrame3* iface,
......
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