Zebediah Figura : d3d9: Retrieve stream frequency state from the primary stateblock.

Alexandre Julliard julliard at winehq.org
Thu Feb 6 15:44:18 CST 2020


Module: wine
Branch: master
Commit: 8ff3041dd4276571b246dc08bf210a45de80a3ab
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=8ff3041dd4276571b246dc08bf210a45de80a3ab

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Mon Feb  3 21:17:44 2020 -0600

d3d9: Retrieve stream frequency state from the primary stateblock.

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/d3d9/device.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index 880e90a2ff..87d7db3d00 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -3747,15 +3747,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)




More information about the wine-cvs mailing list