[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: [PATCH 5/6] ddraw: Retrieve lights from the primary stateblock.
From: Zebediah Figura <z.figura12 () gmail ! com>
Date: 2020-02-28 20:18:45
Message-ID: 20200228201846.252667-5-z.figura12 () gmail ! com
[Download RAW message or body]
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
---
dlls/ddraw/device.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index 9e234fd065..56debb7175 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -5579,17 +5579,17 @@ static HRESULT WINAPI \
d3d_device7_SetLight_FPUPreserve(IDirect3DDevice7 *iface, static HRESULT \
d3d_device7_GetLight(IDirect3DDevice7 *iface, DWORD light_idx, D3DLIGHT7 *light) {
struct d3d_device *device = impl_from_IDirect3DDevice7(iface);
- HRESULT rc;
+ BOOL enabled;
+ HRESULT hr;
TRACE("iface %p, light_idx %u, light %p.\n", iface, light_idx, light);
wined3d_mutex_lock();
/* Note: D3DLIGHT7 is compatible with struct wined3d_light. */
- rc = wined3d_device_get_light(device->wined3d_device, light_idx, (struct \
wined3d_light *)light); + hr = wined3d_stateblock_get_light(device->state, \
light_idx, (struct wined3d_light *)light, &enabled); wined3d_mutex_unlock();
- /* Translate the result. WineD3D returns other values than D3D7 */
- return hr_ddraw_from_wined3d(rc);
+ return hr_ddraw_from_wined3d(hr);
}
static HRESULT WINAPI d3d_device7_GetLight_FPUSetup(IDirect3DDevice7 *iface, DWORD \
light_idx, D3DLIGHT7 *light) @@ -6460,6 +6460,7 @@ static HRESULT WINAPI \
d3d_device7_LightEnable_FPUPreserve(IDirect3DDevice7 *ifac static HRESULT \
d3d_device7_GetLightEnable(IDirect3DDevice7 *iface, DWORD light_idx, BOOL *enabled) \
{ struct d3d_device *device = impl_from_IDirect3DDevice7(iface);
+ struct wined3d_light light;
HRESULT hr;
TRACE("iface %p, light_idx %u, enabled %p.\n", iface, light_idx, enabled);
@@ -6468,7 +6469,7 @@ static HRESULT d3d_device7_GetLightEnable(IDirect3DDevice7 \
*iface, DWORD light_i return DDERR_INVALIDPARAMS;
wined3d_mutex_lock();
- hr = wined3d_device_get_light_enable(device->wined3d_device, light_idx, \
enabled); + hr = wined3d_stateblock_get_light(device->state, light_idx, &light, \
enabled); wined3d_mutex_unlock();
return hr_ddraw_from_wined3d(hr);
--
2.25.0
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic