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
86ffd6c4
Commit
86ffd6c4
authored
Jan 08, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 08, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Make sure create_device() returns NULL on failure.
parent
ddae20b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
visual.c
dlls/d3d9/tests/visual.c
+5
-8
No files found.
dlls/d3d9/tests/visual.c
View file @
86ffd6c4
...
...
@@ -177,7 +177,6 @@ static IDirect3DDevice9 *create_device(IDirect3D9 *d3d9)
{
D3DPRESENT_PARAMETERS
present_parameters
=
{
0
};
IDirect3DDevice9
*
device
;
HRESULT
hr
;
present_parameters
.
Windowed
=
TRUE
;
present_parameters
.
hDeviceWindow
=
create_window
();
...
...
@@ -188,14 +187,12 @@ static IDirect3DDevice9 *create_device(IDirect3D9 *d3d9)
present_parameters
.
EnableAutoDepthStencil
=
TRUE
;
present_parameters
.
AutoDepthStencilFormat
=
D3DFMT_D24S8
;
hr
=
IDirect3D9_CreateDevice
(
d3d9
,
D3DADAPTER_DEFAULT
,
D3DDEVTYPE_HAL
,
present_parameters
.
hDeviceWindow
,
D3DCREATE_HARDWARE_VERTEXPROCESSING
,
&
present_parameters
,
&
device
);
ok
(
hr
==
D3D_OK
||
hr
==
D3DERR_NOTAVAILABLE
||
hr
==
D3DERR_INVALIDCALL
,
"Failed to create a device, hr %#x.
\n
"
,
hr
);
if
(
FAILED
(
hr
))
DestroyWindow
(
present_parameters
.
hDeviceWindow
);
if
(
SUCCEEDED
(
IDirect3D9_CreateDevice
(
d3d9
,
D3DADAPTER_DEFAULT
,
D3DDEVTYPE_HAL
,
present_parameters
.
hDeviceWindow
,
D3DCREATE_HARDWARE_VERTEXPROCESSING
,
&
present_parameters
,
&
device
)))
return
device
;
return
device
;
DestroyWindow
(
present_parameters
.
hDeviceWindow
);
return
NULL
;
}
static
IDirect3DDevice9
*
init_d3d9
(
void
)
...
...
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