[PATCH 1/2] wined3d: Return 1 for stream frequency if the value was not set.

Paul Gofman gofmanp at gmail.com
Thu Feb 7 13:44:10 CST 2019


Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=39080
Signed-off-by: Paul Gofman <gofmanp at gmail.com>
---
 dlls/wined3d/device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index e31ecc32e2..990b29bd73 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1477,7 +1477,7 @@ HRESULT CDECL wined3d_device_get_stream_source_freq(const struct wined3d_device
     TRACE("device %p, stream_idx %u, divider %p.\n", device, stream_idx, divider);
 
     stream = &device->state.streams[stream_idx];
-    *divider = stream->flags | stream->frequency;
+    *divider = stream->flags | (stream->frequency || stream->flags ? stream->frequency : 1);
 
     TRACE("Returning %#x.\n", *divider);
 
-- 
2.20.1




More information about the wine-devel mailing list