Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d8/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index e7c79d54a0..7853aa9b55 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1705,7 +1705,7 @@ static HRESULT WINAPI d3d8_device_GetViewport(IDirect3DDevice8 *iface, D3DVIEWPO TRACE("iface %p, viewport %p.\n", iface, viewport);
wined3d_mutex_lock(); - wined3d_device_get_viewports(device->wined3d_device, NULL, &wined3d_viewport); + wined3d_viewport = wined3d_stateblock_get_state(device->state)->viewport; wined3d_mutex_unlock();
viewport->X = wined3d_viewport.x;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d8/device.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 7853aa9b55..79d41afebf 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1690,8 +1690,6 @@ static HRESULT WINAPI d3d8_device_SetViewport(IDirect3DDevice8 *iface, const D3D vp.max_z = viewport->MaxZ;
wined3d_stateblock_set_viewport(device->update_state, &vp); - if (!device->recording) - wined3d_device_set_viewports(device->wined3d_device, 1, &vp); wined3d_mutex_unlock();
return D3D_OK;
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- 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;
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d8/device.c | 4 ---- 1 file changed, 4 deletions(-)
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 81361a90eb..869a6a2dd0 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1754,8 +1754,6 @@ static HRESULT WINAPI d3d8_device_SetLight(IDirect3DDevice8 *iface, DWORD index, /* Note: D3DLIGHT8 is compatible with struct wined3d_light. */ wined3d_mutex_lock(); hr = wined3d_stateblock_set_light(device->update_state, index, (const struct wined3d_light *)light); - if (SUCCEEDED(hr) && !device->recording) - hr = wined3d_device_set_light(device->wined3d_device, index, (const struct wined3d_light *)light); wined3d_mutex_unlock();
return hr; @@ -1786,8 +1784,6 @@ static HRESULT WINAPI d3d8_device_LightEnable(IDirect3DDevice8 *iface, DWORD ind
wined3d_mutex_lock(); hr = wined3d_stateblock_set_light_enable(device->update_state, index, enable); - if (SUCCEEDED(hr) && !device->recording) - hr = wined3d_device_set_light_enable(device->wined3d_device, index, enable); wined3d_mutex_unlock();
return hr;
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ddraw/device.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 03b03f4584..7fd78e6234 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -245,6 +245,7 @@ static ULONG WINAPI d3d_device_inner_Release(IUnknown *iface)
wined3d_device_set_rendertarget_view(This->wined3d_device, 0, NULL, FALSE);
+ wined3d_stateblock_decref(This->state); if (This->recording) wined3d_stateblock_decref(This->recording);
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com