diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 36b8a7e3426..b4179eb1911 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1308,16 +1308,15 @@ static HRESULT WINAPI d3d8_device_MultiplyTransform(IDirect3DDevice8 *iface, static HRESULT WINAPI d3d8_device_SetViewport(IDirect3DDevice8 *iface, const D3DVIEWPORT8 *viewport) { struct d3d8_device *device = impl_from_IDirect3DDevice8(iface); - HRESULT hr; TRACE("iface %p, viewport %p.\n", iface, viewport); /* Note: D3DVIEWPORT8 is compatible with struct wined3d_viewport. */ wined3d_mutex_lock(); - hr = wined3d_device_set_viewport(device->wined3d_device, (const struct wined3d_viewport *)viewport); + wined3d_device_set_viewport(device->wined3d_device, (const struct wined3d_viewport *)viewport); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d8_device_GetViewport(IDirect3DDevice8 *iface, D3DVIEWPORT8 *viewport) diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 0399ba350d3..6922e81c44f 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -1374,16 +1374,15 @@ static HRESULT WINAPI d3d9_device_MultiplyTransform(IDirect3DDevice9Ex *iface, static HRESULT WINAPI d3d9_device_SetViewport(IDirect3DDevice9Ex *iface, const D3DVIEWPORT9 *viewport) { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); - HRESULT hr; TRACE("iface %p, viewport %p.\n", iface, viewport); /* Note: D3DVIEWPORT9 is compatible with struct wined3d_viewport. */ wined3d_mutex_lock(); - hr = wined3d_device_set_viewport(device->wined3d_device, (const struct wined3d_viewport *)viewport); + wined3d_device_set_viewport(device->wined3d_device, (const struct wined3d_viewport *)viewport); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d9_device_GetViewport(IDirect3DDevice9Ex *iface, D3DVIEWPORT9 *viewport) diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 24bd9938191..aec30de7961 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -4992,7 +4992,6 @@ static HRESULT WINAPI d3d_device7_Clear_FPUPreserve(IDirect3DDevice7 *iface, DWO static HRESULT d3d_device7_SetViewport(IDirect3DDevice7 *iface, D3DVIEWPORT7 *viewport) { struct d3d_device *device = impl_from_IDirect3DDevice7(iface); - HRESULT hr; TRACE("iface %p, viewport %p.\n", iface, viewport); @@ -5001,10 +5000,10 @@ static HRESULT d3d_device7_SetViewport(IDirect3DDevice7 *iface, D3DVIEWPORT7 *vi /* Note: D3DVIEWPORT7 is compatible with struct wined3d_viewport. */ wined3d_mutex_lock(); - hr = wined3d_device_set_viewport(device->wined3d_device, (struct wined3d_viewport *)viewport); + wined3d_device_set_viewport(device->wined3d_device, (struct wined3d_viewport *)viewport); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d_device7_SetViewport_FPUSetup(IDirect3DDevice7 *iface, D3DVIEWPORT7 *viewport) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 7a57195720b..7753ae4d867 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2291,7 +2291,7 @@ INT CDECL wined3d_device_get_base_vertex_index(const struct wined3d_device *devi return device->stateBlock->state.base_vertex_index; } -HRESULT CDECL wined3d_device_set_viewport(struct wined3d_device *device, const struct wined3d_viewport *viewport) +void CDECL wined3d_device_set_viewport(struct wined3d_device *device, const struct wined3d_viewport *viewport) { TRACE("device %p, viewport %p.\n", device, viewport); TRACE("x %u, y %u, w %u, h %u, min_z %.8e, max_z %.8e.\n", @@ -2304,12 +2304,10 @@ HRESULT CDECL wined3d_device_set_viewport(struct wined3d_device *device, const s if (device->isRecordingState) { TRACE("Recording... not performing anything\n"); - return WINED3D_OK; + return; } device_invalidate_state(device, STATE_VIEWPORT); - - return WINED3D_OK; } HRESULT CDECL wined3d_device_get_viewport(const struct wined3d_device *device, struct wined3d_viewport *viewport) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index afb007cf169..fa8b417aeb5 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2239,7 +2239,7 @@ HRESULT __cdecl wined3d_device_set_transform(struct wined3d_device *device, HRESULT __cdecl wined3d_device_set_vertex_declaration(struct wined3d_device *device, struct wined3d_vertex_declaration *declaration); HRESULT __cdecl wined3d_device_set_vertex_shader(struct wined3d_device *device, struct wined3d_shader *shader); -HRESULT __cdecl wined3d_device_set_viewport(struct wined3d_device *device, const struct wined3d_viewport *viewport); +void __cdecl wined3d_device_set_viewport(struct wined3d_device *device, const struct wined3d_viewport *viewport); HRESULT __cdecl wined3d_device_set_vs_consts_b(struct wined3d_device *device, UINT start_register, const BOOL *constants, UINT bool_count); HRESULT __cdecl wined3d_device_set_vs_consts_f(struct wined3d_device *device,