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
a26925d3
Commit
a26925d3
authored
Jun 07, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 07, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxgi: COM cleanup for the IWineDXGIFactory iface.
parent
e3a32e8d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
dxgi_private.h
dlls/dxgi/dxgi_private.h
+1
-1
factory.c
dlls/dxgi/factory.c
+11
-6
No files found.
dlls/dxgi/dxgi_private.h
View file @
a26925d3
...
...
@@ -77,7 +77,7 @@ enum wined3d_format_id wined3dformat_from_dxgi_format(DXGI_FORMAT format) DECLSP
/* IDXGIFactory */
struct
dxgi_factory
{
const
struct
IWineDXGIFactoryVtbl
*
vtbl
;
IWineDXGIFactory
IWineDXGIFactory_iface
;
LONG
refcount
;
struct
wined3d
*
wined3d
;
UINT
adapter_count
;
...
...
dlls/dxgi/factory.c
View file @
a26925d3
...
...
@@ -24,6 +24,11 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
dxgi
);
static
inline
struct
dxgi_factory
*
impl_from_IWineDXGIFactory
(
IWineDXGIFactory
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
dxgi_factory
,
IWineDXGIFactory_iface
);
}
/* IUnknown methods */
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_QueryInterface
(
IWineDXGIFactory
*
iface
,
REFIID
riid
,
void
**
object
)
...
...
@@ -48,7 +53,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_QueryInterface(IWineDXGIFactory *i
static
ULONG
STDMETHODCALLTYPE
dxgi_factory_AddRef
(
IWineDXGIFactory
*
iface
)
{
struct
dxgi_factory
*
This
=
(
struct
dxgi_factory
*
)
iface
;
struct
dxgi_factory
*
This
=
impl_from_IWineDXGIFactory
(
iface
)
;
ULONG
refcount
=
InterlockedIncrement
(
&
This
->
refcount
);
TRACE
(
"%p increasing refcount to %u
\n
"
,
This
,
refcount
);
...
...
@@ -58,7 +63,7 @@ static ULONG STDMETHODCALLTYPE dxgi_factory_AddRef(IWineDXGIFactory *iface)
static
ULONG
STDMETHODCALLTYPE
dxgi_factory_Release
(
IWineDXGIFactory
*
iface
)
{
struct
dxgi_factory
*
This
=
(
struct
dxgi_factory
*
)
iface
;
struct
dxgi_factory
*
This
=
impl_from_IWineDXGIFactory
(
iface
)
;
ULONG
refcount
=
InterlockedDecrement
(
&
This
->
refcount
);
TRACE
(
"%p decreasing refcount to %u
\n
"
,
This
,
refcount
);
...
...
@@ -122,7 +127,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_GetParent(IWineDXGIFactory *iface,
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_EnumAdapters
(
IWineDXGIFactory
*
iface
,
UINT
adapter_idx
,
IDXGIAdapter
**
adapter
)
{
struct
dxgi_factory
*
This
=
(
struct
dxgi_factory
*
)
iface
;
struct
dxgi_factory
*
This
=
impl_from_IWineDXGIFactory
(
iface
)
;
TRACE
(
"iface %p, adapter_idx %u, adapter %p
\n
"
,
iface
,
adapter_idx
,
adapter
);
...
...
@@ -258,7 +263,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSoftwareAdapter(IWineDXGIFac
static
struct
wined3d
*
STDMETHODCALLTYPE
dxgi_factory_get_wined3d
(
IWineDXGIFactory
*
iface
)
{
struct
dxgi_factory
*
This
=
(
struct
dxgi_factory
*
)
iface
;
struct
dxgi_factory
*
This
=
impl_from_IWineDXGIFactory
(
iface
)
;
TRACE
(
"iface %p
\n
"
,
iface
);
...
...
@@ -294,7 +299,7 @@ HRESULT dxgi_factory_init(struct dxgi_factory *factory)
HRESULT
hr
;
UINT
i
;
factory
->
v
tbl
=
&
dxgi_factory_vtbl
;
factory
->
IWineDXGIFactory_iface
.
lpV
tbl
=
&
dxgi_factory_vtbl
;
factory
->
refcount
=
1
;
EnterCriticalSection
(
&
dxgi_cs
);
...
...
@@ -332,7 +337,7 @@ HRESULT dxgi_factory_init(struct dxgi_factory *factory)
goto
fail
;
}
hr
=
dxgi_adapter_init
(
adapter
,
(
IWineDXGIFactory
*
)
factory
,
i
);
hr
=
dxgi_adapter_init
(
adapter
,
&
factory
->
IWineDXGIFactory_iface
,
i
);
if
(
FAILED
(
hr
))
{
UINT
j
;
...
...
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