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
7d351e11
Commit
7d351e11
authored
Apr 12, 2019
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxgi: Slightly simplify d3d11_swapchain_init().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b1568535
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
10 deletions
+8
-10
device.c
dlls/dxgi/device.c
+2
-2
dxgi_private.h
dlls/dxgi/dxgi_private.h
+1
-1
swapchain.c
dlls/dxgi/swapchain.c
+5
-7
No files found.
dlls/dxgi/device.c
View file @
7d351e11
...
...
@@ -474,7 +474,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_factory_create_swapchain(IWineDX
return
E_OUTOFMEMORY
;
}
if
(
FAILED
(
hr
=
d3d11_swapchain_init
(
object
,
device
,
&
wined3d_desc
,
FALSE
)))
if
(
FAILED
(
hr
=
d3d11_swapchain_init
(
object
,
device
,
&
wined3d_desc
)))
{
WARN
(
"Failed to initialise swapchain, hr %#x.
\n
"
,
hr
);
heap_free
(
object
);
...
...
@@ -578,7 +578,7 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l
return
E_OUTOFMEMORY
;
}
if
(
FAILED
(
hr
=
d3d11_swapchain_init
(
swapchain
,
device
,
&
swapchain_desc
,
TRUE
)))
if
(
FAILED
(
hr
=
d3d11_swapchain_init
(
swapchain
,
device
,
&
swapchain_desc
)))
{
WARN
(
"Failed to initialize swapchain, hr %#x.
\n
"
,
hr
);
heap_free
(
swapchain
);
...
...
dlls/dxgi/dxgi_private.h
View file @
7d351e11
...
...
@@ -178,7 +178,7 @@ struct d3d11_swapchain
};
HRESULT
d3d11_swapchain_init
(
struct
d3d11_swapchain
*
swapchain
,
struct
dxgi_device
*
device
,
struct
wined3d_swapchain_desc
*
desc
,
BOOL
implicit
)
DECLSPEC_HIDDEN
;
struct
wined3d_swapchain_desc
*
desc
)
DECLSPEC_HIDDEN
;
HRESULT
d3d12_swapchain_create
(
IWineDXGIFactory
*
factory
,
ID3D12CommandQueue
*
queue
,
HWND
window
,
const
DXGI_SWAP_CHAIN_DESC1
*
swapchain_desc
,
const
DXGI_SWAP_CHAIN_FULLSCREEN_DESC
*
fullscreen_desc
,
...
...
dlls/dxgi/swapchain.c
View file @
7d351e11
...
...
@@ -779,16 +779,14 @@ static const struct wined3d_parent_ops d3d11_swapchain_wined3d_parent_ops =
};
HRESULT
d3d11_swapchain_init
(
struct
d3d11_swapchain
*
swapchain
,
struct
dxgi_device
*
device
,
struct
wined3d_swapchain_desc
*
desc
,
BOOL
implicit
)
struct
wined3d_swapchain_desc
*
desc
)
{
HRESULT
hr
;
/*
* A reference to the implicit swapchain is held by the wined3d device.
* In order to avoid circular references we do not keep a reference
* to the device in the implicit swapchain.
*/
if
(
!
implicit
)
/* A reference to the implicit swapchain is held by the wined3d device. In
* order to avoid circular references we do not keep a reference to the
* device in the implicit swapchain. */
if
(
!
(
desc
->
flags
&
WINED3D_SWAPCHAIN_IMPLICIT
))
{
if
(
desc
->
backbuffer_format
==
WINED3DFMT_UNKNOWN
)
return
E_INVALIDARG
;
...
...
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