Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b0de8d88
Commit
b0de8d88
authored
Mar 07, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8/tests: Handle failure to create a device in the stateblock tests with skip().
parent
ad86da8c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
stateblock.c
dlls/d3d8/tests/stateblock.c
+7
-8
No files found.
dlls/d3d8/tests/stateblock.c
View file @
b0de8d88
...
...
@@ -33,13 +33,12 @@ static HWND create_window(void)
return
CreateWindowA
(
"d3d8_test_wc"
,
"d3d8_test"
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
}
static
IDirect3DDevice8
*
init_d3d8
(
D3DPRESENT_PARAMETERS
*
present_parameters
)
static
IDirect3DDevice8
*
create_device
(
D3DPRESENT_PARAMETERS
*
present_parameters
)
{
IDirect3DDevice8
*
device
;
D3DDISPLAYMODE
d3ddm
;
IDirect3D8
*
d3d8
;
HWND
window
;
HRESULT
hr
;
if
(
!
(
d3d8
=
Direct3DCreate8
(
D3D_SDK_VERSION
)))
{
...
...
@@ -55,11 +54,8 @@ static IDirect3DDevice8 *init_d3d8(D3DPRESENT_PARAMETERS *present_parameters)
present_parameters
->
SwapEffect
=
D3DSWAPEFFECT_DISCARD
;
present_parameters
->
BackBufferFormat
=
d3ddm
.
Format
;
hr
=
IDirect3D8_CreateDevice
(
d3d8
,
D3DADAPTER_DEFAULT
,
D3DDEVTYPE_HAL
,
window
,
D3DCREATE_SOFTWARE_VERTEXPROCESSING
,
present_parameters
,
&
device
);
ok
(
SUCCEEDED
(
hr
)
||
hr
==
D3DERR_NOTAVAILABLE
||
broken
(
hr
==
D3DERR_INVALIDCALL
),
"IDirect3D8_CreateDevice failed, hr %#x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
IDirect3D8_CreateDevice
(
d3d8
,
D3DADAPTER_DEFAULT
,
D3DDEVTYPE_HAL
,
window
,
D3DCREATE_SOFTWARE_VERTEXPROCESSING
,
present_parameters
,
&
device
)))
return
device
;
return
NULL
;
...
...
@@ -2050,8 +2046,11 @@ START_TEST(stateblock)
IDirect3DDevice8
*
device
;
ULONG
refcount
;
if
(
!
(
device
=
init_d3d8
(
&
device_pparams
)))
if
(
!
(
device
=
create_device
(
&
device_pparams
)))
{
skip
(
"Failed to create a 3D device, skipping test.
\n
"
);
return
;
}
test_begin_end_state_block
(
device
);
test_state_management
(
device
,
&
device_pparams
);
...
...
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