[PATCH 3/6] d3d8: Validate presentation interval.

Józef Kucia jkucia at codeweavers.com
Mon Mar 12 07:53:49 CDT 2018


Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
 dlls/d3d8/device.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index 2cc67fe100de..f53b97d3294a 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -304,6 +304,20 @@ static BOOL wined3d_swapchain_desc_from_present_parameters(struct wined3d_swapch
         WARN("Invalid backbuffer count %u.\n", present_parameters->BackBufferCount);
         return FALSE;
     }
+    switch (present_parameters->FullScreen_PresentationInterval)
+    {
+        case D3DPRESENT_INTERVAL_DEFAULT:
+        case D3DPRESENT_INTERVAL_ONE:
+        case D3DPRESENT_INTERVAL_TWO:
+        case D3DPRESENT_INTERVAL_THREE:
+        case D3DPRESENT_INTERVAL_FOUR:
+        case D3DPRESENT_INTERVAL_IMMEDIATE:
+            break;
+        default:
+            WARN("Invalid presentation interval %#x.\n",
+                    present_parameters->FullScreen_PresentationInterval);
+            return FALSE;
+    }
 
     swapchain_desc->backbuffer_width = present_parameters->BackBufferWidth;
     swapchain_desc->backbuffer_height = present_parameters->BackBufferHeight;
-- 
2.16.1




More information about the wine-devel mailing list