Commit 0ada2091 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Remove now redundant error handling from wined3d_device_set_stream_source_freq().

parent 3b0f0b8a
......@@ -1314,30 +1314,13 @@ HRESULT CDECL wined3d_device_get_stream_source(const struct wined3d_device *devi
return WINED3D_OK;
}
static HRESULT wined3d_device_set_stream_source_freq(struct wined3d_device *device, UINT stream_idx, UINT divider)
static void wined3d_device_set_stream_source_freq(struct wined3d_device *device, UINT stream_idx, UINT divider)
{
struct wined3d_stream_state *stream;
UINT old_flags, old_freq;
TRACE("device %p, stream_idx %u, divider %#x.\n", device, stream_idx, divider);
/* Verify input. At least in d3d9 this is invalid. */
if ((divider & WINED3DSTREAMSOURCE_INSTANCEDATA) && (divider & WINED3DSTREAMSOURCE_INDEXEDDATA))
{
WARN("INSTANCEDATA and INDEXEDDATA were set, returning D3DERR_INVALIDCALL.\n");
return WINED3DERR_INVALIDCALL;
}
if ((divider & WINED3DSTREAMSOURCE_INSTANCEDATA) && !stream_idx)
{
WARN("INSTANCEDATA used on stream 0, returning D3DERR_INVALIDCALL.\n");
return WINED3DERR_INVALIDCALL;
}
if (!divider)
{
WARN("Divider is 0, returning D3DERR_INVALIDCALL.\n");
return WINED3DERR_INVALIDCALL;
}
stream = &device->state.streams[stream_idx];
old_flags = stream->flags;
old_freq = stream->frequency;
......@@ -1346,8 +1329,6 @@ static HRESULT wined3d_device_set_stream_source_freq(struct wined3d_device *devi
stream->frequency = divider & 0x7fffff;
if (stream->frequency != old_freq || stream->flags != old_flags)
wined3d_cs_emit_set_stream_source_freq(device->cs, stream_idx, stream->frequency, stream->flags);
return WINED3D_OK;
}
static void wined3d_device_set_transform(struct wined3d_device *device,
......
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