Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ddraw/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 7acc8e0db0..fa79a98777 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -5495,7 +5495,7 @@ static HRESULT d3d_device7_GetMaterial(IDirect3DDevice7 *iface, D3DMATERIAL7 *ma
wined3d_mutex_lock(); /* Note: D3DMATERIAL7 is compatible with struct wined3d_material. */ - wined3d_device_get_material(device->wined3d_device, (struct wined3d_material *)material); + memcpy(material, &wined3d_stateblock_get_state(device->state)->material, sizeof(*material)); wined3d_mutex_unlock();
return D3D_OK;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ddraw/device.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index fa79a98777..6603835ef0 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -5448,8 +5448,6 @@ static HRESULT d3d_device7_SetMaterial(IDirect3DDevice7 *iface, D3DMATERIAL7 *ma wined3d_mutex_lock(); /* Note: D3DMATERIAL7 is compatible with struct wined3d_material. */ wined3d_stateblock_set_material(device->update_state, (const struct wined3d_material *)material); - if (!device->recording) - wined3d_device_set_material(device->wined3d_device, (const struct wined3d_material *)material); wined3d_mutex_unlock();
return D3D_OK;
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ddraw/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 6603835ef0..240f79b432 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -3884,7 +3884,7 @@ static HRESULT WINAPI d3d_device7_GetClipStatus(IDirect3DDevice7 *iface, D3DCLIP
FIXME("iface %p, clip_status %p stub.\n", iface, clip_status);
- wined3d_device_get_viewports(device->wined3d_device, NULL, &vp); + vp = wined3d_stateblock_get_state(device->state)->viewport; clip_status->minx = vp.x; clip_status->maxx = vp.x + vp.width; clip_status->miny = vp.y; @@ -5391,7 +5391,7 @@ static HRESULT d3d_device7_GetViewport(IDirect3DDevice7 *iface, D3DVIEWPORT7 *vi return DDERR_INVALIDPARAMS;
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->dwX = wined3d_viewport.x;
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ddraw/device.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 240f79b432..9e234fd065 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -5356,8 +5356,6 @@ static HRESULT d3d_device7_SetViewport(IDirect3DDevice7 *iface, D3DVIEWPORT7 *vi vp.max_z = viewport->dvMaxZ;
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/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);
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ddraw/device.c | 4 ---- 1 file changed, 4 deletions(-)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 56debb7175..39626157a5 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -5539,8 +5539,6 @@ static HRESULT d3d_device7_SetLight(IDirect3DDevice7 *iface, DWORD light_idx, D3 wined3d_mutex_lock(); /* Note: D3DLIGHT7 is compatible with struct wined3d_light. */ hr = wined3d_stateblock_set_light(device->update_state, light_idx, (const struct wined3d_light *)light); - if (SUCCEEDED(hr) && !device->recording) - hr = wined3d_device_set_light(device->wined3d_device, light_idx, (const struct wined3d_light *)light); wined3d_mutex_unlock();
return hr_ddraw_from_wined3d(hr); @@ -6417,8 +6415,6 @@ static HRESULT d3d_device7_LightEnable(IDirect3DDevice7 *iface, DWORD light_idx,
wined3d_mutex_lock(); hr = wined3d_stateblock_set_light_enable(device->update_state, light_idx, enabled); - if (SUCCEEDED(hr) && !device->recording) - hr = wined3d_device_set_light_enable(device->wined3d_device, light_idx, enabled); wined3d_mutex_unlock();
return hr_ddraw_from_wined3d(hr);
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com