diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 2662f4ebb9c..40bc169a895 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -1865,15 +1865,14 @@ static HRESULT WINAPI d3d9_device_GetCurrentTexturePalette(IDirect3DDevice9Ex *i static HRESULT WINAPI d3d9_device_SetScissorRect(IDirect3DDevice9Ex *iface, const RECT *rect) { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); - HRESULT hr; TRACE("iface %p, rect %p.\n", iface, rect); wined3d_mutex_lock(); - hr = wined3d_device_set_scissor_rect(device->wined3d_device, rect); + wined3d_device_set_scissor_rect(device->wined3d_device, rect); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d9_device_GetScissorRect(IDirect3DDevice9Ex *iface, RECT *rect) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 8439c13e086..6d85ff585df 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2382,7 +2382,7 @@ DWORD CDECL wined3d_device_get_sampler_state(const struct wined3d_device *device return device->stateBlock->state.sampler_states[sampler_idx][state]; } -HRESULT CDECL wined3d_device_set_scissor_rect(struct wined3d_device *device, const RECT *rect) +void CDECL wined3d_device_set_scissor_rect(struct wined3d_device *device, const RECT *rect) { TRACE("device %p, rect %s.\n", device, wine_dbgstr_rect(rect)); @@ -2390,19 +2390,17 @@ HRESULT CDECL wined3d_device_set_scissor_rect(struct wined3d_device *device, con if (EqualRect(&device->updateStateBlock->state.scissor_rect, rect)) { TRACE("App is setting the old scissor rectangle over, nothing to do.\n"); - return WINED3D_OK; + return; } CopyRect(&device->updateStateBlock->state.scissor_rect, rect); if (device->isRecordingState) { TRACE("Recording... not performing anything.\n"); - return WINED3D_OK; + return; } device_invalidate_state(device, STATE_SCISSORRECT); - - return WINED3D_OK; } HRESULT CDECL wined3d_device_get_scissor_rect(const struct wined3d_device *device, RECT *rect) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index b44cc425393..af88163c6a1 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2225,7 +2225,7 @@ HRESULT __cdecl wined3d_device_set_render_target(struct wined3d_device *device, UINT render_target_idx, struct wined3d_surface *render_target, BOOL set_viewport); void __cdecl wined3d_device_set_sampler_state(struct wined3d_device *device, UINT sampler_idx, enum wined3d_sampler_state state, DWORD value); -HRESULT __cdecl wined3d_device_set_scissor_rect(struct wined3d_device *device, const RECT *rect); +void __cdecl wined3d_device_set_scissor_rect(struct wined3d_device *device, const RECT *rect); HRESULT __cdecl wined3d_device_set_software_vertex_processing(struct wined3d_device *device, BOOL software); HRESULT __cdecl wined3d_device_set_stream_source(struct wined3d_device *device, UINT stream_idx, struct wined3d_buffer *buffer, UINT offset, UINT stride);