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
f485816d
Commit
f485816d
authored
Apr 12, 2019
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Simplify ddraw_destroy_swapchain().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
15d52fec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
27 deletions
+17
-27
ddraw.c
dlls/ddraw/ddraw.c
+17
-27
No files found.
dlls/ddraw/ddraw.c
View file @
f485816d
...
...
@@ -365,44 +365,34 @@ static ULONG WINAPI d3d1_AddRef(IDirect3D *iface)
static
void
ddraw_destroy_swapchain
(
struct
ddraw
*
ddraw
)
{
unsigned
int
i
;
HRESULT
hr
;
TRACE
(
"Destroying the swapchain.
\n
"
);
wined3d_swapchain_decref
(
ddraw
->
wined3d_swapchain
);
ddraw
->
wined3d_swapchain
=
NULL
;
if
(
!
(
ddraw
->
flags
&
DDRAW_NO3D
)
)
for
(
i
=
0
;
i
<
ddraw
->
numConvertedDecls
;
++
i
)
{
UINT
i
;
wined3d_vertex_declaration_decref
(
ddraw
->
decls
[
i
].
decl
);
}
heap_free
(
ddraw
->
decls
);
ddraw
->
numConvertedDecls
=
0
;
for
(
i
=
0
;
i
<
ddraw
->
numConvertedDecls
;
++
i
)
{
wined3d_vertex_declaration_decref
(
ddraw
->
decls
[
i
].
decl
);
}
heap_free
(
ddraw
->
decls
);
ddraw
->
numConvertedDecls
=
0
;
if
(
FAILED
(
hr
=
wined3d_device_uninit_3d
(
ddraw
->
wined3d_device
)))
ERR
(
"Failed to uninit 3D, hr %#x.
\n
"
,
hr
);
if
(
FAILED
(
wined3d_device_uninit_3d
(
ddraw
->
wined3d_device
)))
{
ERR
(
"Failed to uninit 3D.
\n
"
);
}
else
{
/* Free the d3d window if one was created. */
if
(
ddraw
->
d3d_window
&&
ddraw
->
d3d_window
!=
ddraw
->
dest_window
)
{
TRACE
(
"Destroying the hidden render window %p.
\n
"
,
ddraw
->
d3d_window
);
DestroyWindow
(
ddraw
->
d3d_window
);
ddraw
->
d3d_window
=
0
;
}
}
ddraw
->
flags
&=
~
DDRAW_D3D_INITIALIZED
;
}
else
/* Free the d3d window if one was created. */
if
(
ddraw
->
d3d_window
&&
ddraw
->
d3d_window
!=
ddraw
->
dest_window
)
{
wined3d_device_uninit_3d
(
ddraw
->
wined3d_device
);
TRACE
(
"Destroying the hidden render window %p.
\n
"
,
ddraw
->
d3d_window
);
DestroyWindow
(
ddraw
->
d3d_window
);
ddraw
->
d3d_window
=
0
;
}
ddraw
->
flags
&=
~
DDRAW_D3D_INITIALIZED
;
ddraw_set_swapchain_window
(
ddraw
,
NULL
);
TRACE
(
"Swapchain destroyed.
\n
"
);
...
...
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