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
ad86da8c
Commit
ad86da8c
authored
Mar 07, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Handle failure to create a device in the stateblock tests with skip().
parent
314a016e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
stateblock.c
dlls/d3d9/tests/stateblock.c
+7
-7
No files found.
dlls/d3d9/tests/stateblock.c
View file @
ad86da8c
...
...
@@ -34,12 +34,11 @@ static HWND create_window(void)
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
}
static
IDirect3DDevice9
*
init_d3d9
(
D3DPRESENT_PARAMETERS
*
present_parameters
)
static
IDirect3DDevice9
*
create_device
(
D3DPRESENT_PARAMETERS
*
present_parameters
)
{
IDirect3DDevice9
*
device
;
IDirect3D9
*
d3d9
;
HWND
window
;
HRESULT
hr
;
if
(
!
(
d3d9
=
Direct3DCreate9
(
D3D_SDK_VERSION
)))
{
...
...
@@ -54,10 +53,8 @@ static IDirect3DDevice9 *init_d3d9(D3DPRESENT_PARAMETERS *present_parameters)
present_parameters
->
hDeviceWindow
=
window
;
present_parameters
->
SwapEffect
=
D3DSWAPEFFECT_DISCARD
;
hr
=
IDirect3D9_CreateDevice
(
d3d9
,
D3DADAPTER_DEFAULT
,
D3DDEVTYPE_HAL
,
window
,
D3DCREATE_SOFTWARE_VERTEXPROCESSING
,
present_parameters
,
&
device
);
ok
(
hr
==
D3D_OK
||
hr
==
D3DERR_NOTAVAILABLE
,
"Failed to create device, hr %#x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
IDirect3D9_CreateDevice
(
d3d9
,
D3DADAPTER_DEFAULT
,
D3DDEVTYPE_HAL
,
window
,
D3DCREATE_SOFTWARE_VERTEXPROCESSING
,
present_parameters
,
&
device
)))
return
device
;
return
NULL
;
...
...
@@ -2438,8 +2435,11 @@ START_TEST(stateblock)
IDirect3DDevice9
*
device
;
ULONG
refcount
;
if
(
!
(
device
=
init_d3d9
(
&
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