Zebediah Figura : wined3d: Remove now redundant error handling from wined3d_device_set_stream_source_freq().
Alexandre Julliard
julliard at winehq.org
Thu Mar 5 16:35:26 CST 2020
Module: wine
Branch: master
Commit: 0ada20912575ad00db6debfaedacf2a455ff2274
URL: https://source.winehq.org/git/wine.git/?a=commit;h=0ada20912575ad00db6debfaedacf2a455ff2274
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Wed Mar 4 22:46:48 2020 -0600
wined3d: Remove now redundant error handling from wined3d_device_set_stream_source_freq().
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/device.c | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 43505e6ad3..f58552a53d 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -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,
More information about the wine-cvs
mailing list