d3d8: Accept D3DSWAPEFFECT_COPY_VSYNC.
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
This commit is contained in:
parent
e8c1cf4402
commit
6b8564d629
|
@ -191,13 +191,14 @@ static void present_parameters_from_wined3d_swapchain_desc(D3DPRESENT_PARAMETERS
|
|||
static BOOL wined3d_swapchain_desc_from_present_parameters(struct wined3d_swapchain_desc *swapchain_desc,
|
||||
const D3DPRESENT_PARAMETERS *present_parameters)
|
||||
{
|
||||
if (!present_parameters->SwapEffect || present_parameters->SwapEffect > D3DSWAPEFFECT_COPY)
|
||||
if (!present_parameters->SwapEffect || present_parameters->SwapEffect > D3DSWAPEFFECT_COPY_VSYNC)
|
||||
{
|
||||
WARN("Invalid swap effect %u passed.\n", present_parameters->SwapEffect);
|
||||
return FALSE;
|
||||
}
|
||||
if (present_parameters->BackBufferCount > 3
|
||||
|| (present_parameters->SwapEffect == D3DSWAPEFFECT_COPY
|
||||
|| ((present_parameters->SwapEffect == D3DSWAPEFFECT_COPY
|
||||
|| present_parameters->SwapEffect == D3DSWAPEFFECT_COPY_VSYNC)
|
||||
&& present_parameters->BackBufferCount > 1))
|
||||
{
|
||||
WARN("Invalid backbuffer count %u.\n", present_parameters->BackBufferCount);
|
||||
|
|
|
@ -7326,6 +7326,10 @@ static void test_swapchain_parameters(void)
|
|||
{TRUE, 1, D3DSWAPEFFECT_COPY, D3D_OK},
|
||||
{TRUE, 2, D3DSWAPEFFECT_COPY, D3DERR_INVALIDCALL},
|
||||
{FALSE, 2, D3DSWAPEFFECT_COPY, D3DERR_INVALIDCALL},
|
||||
{TRUE, 0, D3DSWAPEFFECT_COPY_VSYNC, D3D_OK},
|
||||
{TRUE, 1, D3DSWAPEFFECT_COPY_VSYNC, D3D_OK},
|
||||
{TRUE, 2, D3DSWAPEFFECT_COPY_VSYNC, D3DERR_INVALIDCALL},
|
||||
{FALSE, 2, D3DSWAPEFFECT_COPY_VSYNC, D3DERR_INVALIDCALL},
|
||||
|
||||
/* Ok with the others, in fullscreen and windowed mode. */
|
||||
{TRUE, 2, D3DSWAPEFFECT_DISCARD, D3D_OK},
|
||||
|
@ -7333,6 +7337,10 @@ static void test_swapchain_parameters(void)
|
|||
{FALSE, 2, D3DSWAPEFFECT_DISCARD, D3D_OK},
|
||||
{FALSE, 2, D3DSWAPEFFECT_FLIP, D3D_OK},
|
||||
|
||||
/* Invalid swapeffects. */
|
||||
{TRUE, 1, D3DSWAPEFFECT_COPY_VSYNC + 1, D3DERR_INVALIDCALL},
|
||||
{FALSE, 1, D3DSWAPEFFECT_COPY_VSYNC + 1, D3DERR_INVALIDCALL},
|
||||
|
||||
/* 3 is the highest allowed backbuffer count. */
|
||||
{TRUE, 3, D3DSWAPEFFECT_DISCARD, D3D_OK},
|
||||
{TRUE, 4, D3DSWAPEFFECT_DISCARD, D3DERR_INVALIDCALL},
|
||||
|
|
Loading…
Reference in New Issue