Commit 9d62b50c authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

d3d9: Validate presentation interval.

parent 93e7878c
......@@ -331,6 +331,19 @@ 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->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->PresentationInterval);
return FALSE;
}
swapchain_desc->backbuffer_width = present_parameters->BackBufferWidth;
swapchain_desc->backbuffer_height = present_parameters->BackBufferHeight;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment