[PATCH 4/5] d3d9: Retrieve stream frequency state from the primary stateblock.

Zebediah Figura z.figura12 at gmail.com
Mon Feb 3 18:14:34 CST 2020


Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/d3d9/device.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index 05cbb0f665..607d96b101 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -3744,15 +3744,16 @@ static HRESULT WINAPI d3d9_device_SetStreamSourceFreq(IDirect3DDevice9Ex *iface,
 static HRESULT WINAPI d3d9_device_GetStreamSourceFreq(IDirect3DDevice9Ex *iface, UINT stream_idx, UINT *freq)
 {
     struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
-    HRESULT hr;
+    const struct wined3d_stream_state *stream;
 
     TRACE("iface %p, stream_idx %u, freq %p.\n", iface, stream_idx, freq);
 
     wined3d_mutex_lock();
-    hr = wined3d_device_get_stream_source_freq(device->wined3d_device, stream_idx, freq);
+    stream = &wined3d_stateblock_get_state(device->state)->streams[stream_idx];
+    *freq = stream->flags | stream->frequency;
     wined3d_mutex_unlock();
 
-    return hr;
+    return D3D_OK;
 }
 
 static HRESULT WINAPI d3d9_device_SetIndices(IDirect3DDevice9Ex *iface, IDirect3DIndexBuffer9 *buffer)
-- 
2.25.0




More information about the wine-devel mailing list