Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6b8564d6
Commit
6b8564d6
authored
Sep 28, 2015
by
Stefan Dösinger
Committed by
Alexandre Julliard
Oct 02, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Accept D3DSWAPEFFECT_COPY_VSYNC.
Signed-off-by:
Stefan Dösinger
<
stefan@codeweavers.com
>
parent
e8c1cf44
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
22 deletions
+31
-22
device.c
dlls/d3d8/device.c
+3
-2
device.c
dlls/d3d8/tests/device.c
+28
-20
No files found.
dlls/d3d8/device.c
View file @
6b8564d6
...
...
@@ -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
);
...
...
dlls/d3d8/tests/device.c
View file @
6b8564d6
...
...
@@ -7309,36 +7309,44 @@ static void test_swapchain_parameters(void)
tests
[]
=
{
/* Swap effect 0 is not allowed. */
{
TRUE
,
1
,
0
,
D3DERR_INVALIDCALL
},
{
FALSE
,
1
,
0
,
D3DERR_INVALIDCALL
},
{
TRUE
,
1
,
0
,
D3DERR_INVALIDCALL
},
{
FALSE
,
1
,
0
,
D3DERR_INVALIDCALL
},
/* All (non-ex) swap effects are allowed in
* windowed and fullscreen mode. */
{
TRUE
,
1
,
D3DSWAPEFFECT_DISCARD
,
D3D_OK
},
{
TRUE
,
1
,
D3DSWAPEFFECT_FLIP
,
D3D_OK
},
{
FALSE
,
1
,
D3DSWAPEFFECT_DISCARD
,
D3D_OK
},
{
FALSE
,
1
,
D3DSWAPEFFECT_FLIP
,
D3D_OK
},
{
FALSE
,
1
,
D3DSWAPEFFECT_COPY
,
D3D_OK
},
{
TRUE
,
1
,
D3DSWAPEFFECT_DISCARD
,
D3D_OK
},
{
TRUE
,
1
,
D3DSWAPEFFECT_FLIP
,
D3D_OK
},
{
FALSE
,
1
,
D3DSWAPEFFECT_DISCARD
,
D3D_OK
},
{
FALSE
,
1
,
D3DSWAPEFFECT_FLIP
,
D3D_OK
},
{
FALSE
,
1
,
D3DSWAPEFFECT_COPY
,
D3D_OK
},
/* Only one backbuffer in copy mode. Reset allows it for
* some reason. */
{
TRUE
,
0
,
D3DSWAPEFFECT_COPY
,
D3D_OK
},
{
TRUE
,
1
,
D3DSWAPEFFECT_COPY
,
D3D_OK
},
{
TRUE
,
2
,
D3DSWAPEFFECT_COPY
,
D3DERR_INVALIDCALL
},
{
FALSE
,
2
,
D3DSWAPEFFECT_COPY
,
D3DERR_INVALIDCALL
},
{
TRUE
,
0
,
D3DSWAPEFFECT_COPY
,
D3D_OK
},
{
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
},
{
TRUE
,
2
,
D3DSWAPEFFECT_FLIP
,
D3D_OK
},
{
FALSE
,
2
,
D3DSWAPEFFECT_DISCARD
,
D3D_OK
},
{
FALSE
,
2
,
D3DSWAPEFFECT_FLIP
,
D3D_OK
},
{
TRUE
,
2
,
D3DSWAPEFFECT_DISCARD
,
D3D_OK
},
{
TRUE
,
2
,
D3DSWAPEFFECT_FLIP
,
D3D_OK
},
{
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
},
{
TRUE
,
4
,
D3DSWAPEFFECT_FLIP
,
D3DERR_INVALIDCALL
},
{
FALSE
,
4
,
D3DSWAPEFFECT_DISCARD
,
D3DERR_INVALIDCALL
},
{
FALSE
,
4
,
D3DSWAPEFFECT_FLIP
,
D3DERR_INVALIDCALL
},
{
TRUE
,
3
,
D3DSWAPEFFECT_DISCARD
,
D3D_OK
},
{
TRUE
,
4
,
D3DSWAPEFFECT_DISCARD
,
D3DERR_INVALIDCALL
},
{
TRUE
,
4
,
D3DSWAPEFFECT_FLIP
,
D3DERR_INVALIDCALL
},
{
FALSE
,
4
,
D3DSWAPEFFECT_DISCARD
,
D3DERR_INVALIDCALL
},
{
FALSE
,
4
,
D3DSWAPEFFECT_FLIP
,
D3DERR_INVALIDCALL
},
};
window
=
CreateWindowA
(
"static"
,
"d3d8_test"
,
WS_OVERLAPPEDWINDOW
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment