Commit 2de9fc64 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: wined3d_device_set_scissor_rect() never fails.

parent 5fe32c8b
......@@ -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)
......
......@@ -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)
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment