From 93e7878cb41a29530ee49246f7c5332b4a8d93a9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B3zef=20Kucia?= Date: Mon, 12 Mar 2018 13:53:49 +0100 Subject: [PATCH] d3d8: Validate presentation interval. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d3d8/device.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 5624d761c22..17e02a3b1c6 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.11.4.GIT