Zebediah Figura : d3d8: Retrieve light state from the primary stateblock.
Module: wine Branch: master Commit: f7d744e9c581c62321bc70ae0a279ddc07ce7ab7 URL: https://source.winehq.org/git/wine.git/?a=commit;h=f7d744e9c581c62321bc70ae0... Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Feb 25 17:35:06 2020 -0600 d3d8: Retrieve light state from the primary stateblock. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d8/device.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 79d41afebf..81361a90eb 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1764,13 +1764,14 @@ static HRESULT WINAPI d3d8_device_SetLight(IDirect3DDevice8 *iface, DWORD index, static HRESULT WINAPI d3d8_device_GetLight(IDirect3DDevice8 *iface, DWORD index, D3DLIGHT8 *light) { struct d3d8_device *device = impl_from_IDirect3DDevice8(iface); + BOOL enabled; HRESULT hr; TRACE("iface %p, index %u, light %p.\n", iface, index, light); /* Note: D3DLIGHT8 is compatible with struct wined3d_light. */ wined3d_mutex_lock(); - hr = wined3d_device_get_light(device->wined3d_device, index, (struct wined3d_light *)light); + hr = wined3d_stateblock_get_light(device->state, index, (struct wined3d_light *)light, &enabled); wined3d_mutex_unlock(); return hr; @@ -1792,15 +1793,16 @@ static HRESULT WINAPI d3d8_device_LightEnable(IDirect3DDevice8 *iface, DWORD ind return hr; } -static HRESULT WINAPI d3d8_device_GetLightEnable(IDirect3DDevice8 *iface, DWORD index, BOOL *enable) +static HRESULT WINAPI d3d8_device_GetLightEnable(IDirect3DDevice8 *iface, DWORD index, BOOL *enabled) { struct d3d8_device *device = impl_from_IDirect3DDevice8(iface); + struct wined3d_light light; HRESULT hr; - TRACE("iface %p, index %u, enable %p.\n", iface, index, enable); + TRACE("iface %p, index %u, enabled %p.\n", iface, index, enabled); wined3d_mutex_lock(); - hr = wined3d_device_get_light_enable(device->wined3d_device, index, enable); + hr = wined3d_stateblock_get_light(device->state, index, &light, enabled); wined3d_mutex_unlock(); return hr;
participants (1)
-
Alexandre Julliard