d3d8: Validate presentation interval.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2018-03-12 13:53:49 +01:00 committed by Alexandre Julliard
parent e318f8c825
commit 93e7878cb4
1 changed files with 14 additions and 0 deletions

View File

@ -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;