Skip to content

Commit

Permalink
d3d8: Validate presentation interval.
Browse files Browse the repository at this point in the history
Signed-off-by: Józef Kucia <[email protected]>
Signed-off-by: Henri Verbeet <[email protected]>
Signed-off-by: Alexandre Julliard <[email protected]>
  • Loading branch information
jozefkucia authored and julliard committed Mar 12, 2018
1 parent e318f8c commit 93e7878
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions dlls/d3d8/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 93e7878

Please sign in to comment.