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
70088c4e
Commit
70088c4e
authored
Nov 14, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 14, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10: Use the factory that created the adapter to create a swapchain.
parent
81e92fc8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
3 deletions
+22
-3
d3d10_main.c
dlls/d3d10/d3d10_main.c
+22
-3
No files found.
dlls/d3d10/d3d10_main.c
View file @
70088c4e
...
...
@@ -141,6 +141,7 @@ HRESULT WINAPI D3D10CreateDeviceAndSwapChain(IDXGIAdapter *adapter, D3D10_DRIVER
HMODULE
swrast
,
UINT
flags
,
UINT
sdk_version
,
DXGI_SWAP_CHAIN_DESC
*
swapchain_desc
,
IDXGISwapChain
**
swapchain
,
ID3D10Device
**
device
)
{
IDXGIDevice
*
dxgi_device
;
IDXGIFactory
*
factory
;
HRESULT
hr
;
...
...
@@ -153,22 +154,40 @@ HRESULT WINAPI D3D10CreateDeviceAndSwapChain(IDXGIAdapter *adapter, D3D10_DRIVER
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to create a device, returning %#x
\n
"
,
hr
);
*
device
=
NULL
;
return
hr
;
}
TRACE
(
"Created ID3D10Device %p
\n
"
,
*
device
);
hr
=
CreateDXGIFactory
(
&
IID_IDXGIFactory
,
(
void
**
)
&
factory
);
hr
=
ID3D10Device_QueryInterface
(
*
device
,
&
IID_IDXGIDevice
,
(
void
**
)
&
dxgi_device
);
if
(
FAILED
(
hr
))
{
ERR
(
"Failed to get a dxgi device from the d3d10 device, returning %#x
\n
"
,
hr
);
ID3D10Device_Release
(
*
device
);
*
device
=
NULL
;
return
hr
;
}
WARN
(
"Failed to create a DXGI factory, returning %#x
\n
"
,
hr
);
hr
=
IDXGIDevice_GetAdapter
(
dxgi_device
,
&
adapter
);
IDXGIDevice_Release
(
dxgi_device
);
if
(
FAILED
(
hr
))
{
ERR
(
"Failed to get the device adapter, returning %#x
\n
"
,
hr
);
ID3D10Device_Release
(
*
device
);
*
device
=
NULL
;
return
hr
;
}
TRACE
(
"Created IDXGIFactory %p
\n
"
,
factory
);
hr
=
IDXGIAdapter_GetParent
(
adapter
,
&
IID_IDXGIFactory
,
(
void
**
)
&
factory
);
IDXGIAdapter_Release
(
adapter
);
if
(
FAILED
(
hr
))
{
ERR
(
"Failed to get the adapter factory, returning %#x
\n
"
,
hr
);
ID3D10Device_Release
(
*
device
);
*
device
=
NULL
;
return
hr
;
}
hr
=
IDXGIFactory_CreateSwapChain
(
factory
,
(
IUnknown
*
)
*
device
,
swapchain_desc
,
swapchain
);
IDXGIFactory_Release
(
factory
);
...
...
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