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
479e3672
Commit
479e3672
authored
Nov 17, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 17, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxgi: Add a IWineD3D field to dxgi_factory.
parent
e2572c97
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
86 additions
and
20 deletions
+86
-20
.gitignore
.gitignore
+1
-0
Makefile.in
dlls/dxgi/Makefile.in
+3
-1
dxgi_main.c
dlls/dxgi/dxgi_main.c
+7
-3
dxgi_private.h
dlls/dxgi/dxgi_private.h
+11
-2
dxgi_private_interface.idl
dlls/dxgi/dxgi_private_interface.idl
+29
-0
factory.c
dlls/dxgi/factory.c
+35
-14
No files found.
.gitignore
View file @
479e3672
...
...
@@ -34,6 +34,7 @@ dlls/ctl3dv2.dll16
dlls/ddeml.dll16
dlls/dispdib.dll16
dlls/display.drv16
dlls/dxgi/dxgi_private_interface.h
dlls/gdi.exe16
dlls/imm.dll16
dlls/jscript/jsglobal.tlb
...
...
dlls/dxgi/Makefile.in
View file @
479e3672
...
...
@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
MODULE
=
dxgi.dll
IMPORTLIB
=
dxgi
IMPORTS
=
dxguid uuid kernel32
IMPORTS
=
dxguid uuid
wined3d
kernel32
C_SRCS
=
\
adapter.c
\
...
...
@@ -16,6 +16,8 @@ C_SRCS = \
RC_SRCS
=
version.rc
IDL_H_SRCS
=
dxgi_private_interface.idl
@MAKE_DLL_RULES@
@DEPENDENCIES@
# everything below this line is overwritten by make depend
dlls/dxgi/dxgi_main.c
View file @
479e3672
...
...
@@ -20,11 +20,11 @@
#include "config.h"
#include "wine/port.h"
#define DXGI_INIT_GUID
#include "dxgi_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
dxgi
);
static
CRITICAL_SECTION
dxgi_cs
;
static
CRITICAL_SECTION_DEBUG
dxgi_cs_debug
=
{
0
,
0
,
&
dxgi_cs
,
...
...
@@ -32,7 +32,7 @@ static CRITICAL_SECTION_DEBUG dxgi_cs_debug =
&
dxgi_cs_debug
.
ProcessLocksList
},
0
,
0
,
{(
DWORD_PTR
)(
__FILE__
": dxgi_cs"
)}
};
static
CRITICAL_SECTION
dxgi_cs
=
{
&
dxgi_cs_debug
,
-
1
,
0
,
0
,
0
,
0
};
CRITICAL_SECTION
dxgi_cs
=
{
&
dxgi_cs_debug
,
-
1
,
0
,
0
,
0
,
0
};
struct
dxgi_main
{
...
...
@@ -81,7 +81,7 @@ HRESULT WINAPI CreateDXGIFactory(REFIID riid, void **factory)
struct
dxgi_factory
*
object
;
HRESULT
hr
;
FIXME
(
"riid %s, factory %p partial stub!
\n
"
,
debugstr_guid
(
riid
),
factory
);
TRACE
(
"riid %s, factory %p
\n
"
,
debugstr_guid
(
riid
),
factory
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
...
...
@@ -93,6 +93,10 @@ HRESULT WINAPI CreateDXGIFactory(REFIID riid, void **factory)
object
->
vtbl
=
&
dxgi_factory_vtbl
;
object
->
refcount
=
1
;
EnterCriticalSection
(
&
dxgi_cs
);
object
->
wined3d
=
WineDirect3DCreate
(
10
,
(
IUnknown
*
)
object
);
LeaveCriticalSection
(
&
dxgi_cs
);
TRACE
(
"Created IDXGIFactory %p
\n
"
,
object
);
hr
=
IDXGIFactory_QueryInterface
((
IDXGIFactory
*
)
object
,
riid
,
factory
);
...
...
dlls/dxgi/dxgi_private.h
View file @
479e3672
...
...
@@ -23,20 +23,29 @@
#define COBJMACROS
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "objbase.h"
#include "dxgi.h"
#include "wine/wined3d_interface.h"
#ifdef DXGI_INIT_GUID
#include "initguid.h"
#endif
#include "dxgi_private_interface.h"
extern
CRITICAL_SECTION
dxgi_cs
;
/* TRACE helper functions */
const
char
*
debug_dxgi_format
(
DXGI_FORMAT
format
);
/* IDXGIFactory */
extern
const
struct
IDXGIFactoryVtbl
dxgi_factory_vtbl
;
extern
const
struct
I
Wine
DXGIFactoryVtbl
dxgi_factory_vtbl
;
struct
dxgi_factory
{
const
struct
IDXGIFactoryVtbl
*
vtbl
;
const
struct
I
Wine
DXGIFactoryVtbl
*
vtbl
;
LONG
refcount
;
IWineD3D
*
wined3d
;
};
/* IDXGIDevice */
...
...
dlls/dxgi/dxgi_private_interface.idl
0 → 100644
View file @
479e3672
/*
*
Copyright
2008
Henri
Verbeet
for
CodeWeavers
*
*
This
library
is
free
software
; you can redistribute it and/or
*
modify
it
under
the
terms
of
the
GNU
Lesser
General
Public
*
License
as
published
by
the
Free
Software
Foundation
; either
*
version
2.1
of
the
License
,
or
(
at
your
option
)
any
later
version
.
*
*
This
library
is
distributed
in
the
hope
that
it
will
be
useful
,
*
but
WITHOUT
ANY
WARRANTY
; without even the implied warranty of
*
MERCHANTABILITY
or
FITNESS
FOR
A
PARTICULAR
PURPOSE
.
See
the
GNU
*
Lesser
General
Public
License
for
more
details
.
*
*
You
should
have
received
a
copy
of
the
GNU
Lesser
General
Public
*
License
along
with
this
library
; if not, write to the Free Software
*
Foundation
,
Inc
.
,
51
Franklin
St
,
Fifth
Floor
,
Boston
,
MA
02110
-
1301
,
USA
*/
import
"dxgi.idl"
;
[
object
,
local
,
uuid
(
a07ad9ab
-
fb01
-
4574
-
8b
fb
-
0
a70a7373f04
)
]
interface
IWineDXGIFactory
:
IDXGIFactory
{
struct
IWineD3D
*
get_wined3d
()
;
}
dlls/dxgi/factory.c
View file @
479e3672
...
...
@@ -26,13 +26,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(dxgi);
/* IUnknown methods */
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_QueryInterface
(
IDXGIFactory
*
iface
,
REFIID
riid
,
void
**
object
)
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_QueryInterface
(
I
Wine
DXGIFactory
*
iface
,
REFIID
riid
,
void
**
object
)
{
TRACE
(
"iface %p, riid %s, object %p
\n
"
,
iface
,
debugstr_guid
(
riid
),
object
);
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IDXGIObject
)
||
IsEqualGUID
(
riid
,
&
IID_IDXGIFactory
))
||
IsEqualGUID
(
riid
,
&
IID_IDXGIFactory
)
||
IsEqualGUID
(
riid
,
&
IID_IWineDXGIFactory
))
{
IUnknown_AddRef
(
iface
);
*
object
=
iface
;
...
...
@@ -45,7 +46,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_QueryInterface(IDXGIFactory *iface
return
E_NOINTERFACE
;
}
static
ULONG
STDMETHODCALLTYPE
dxgi_factory_AddRef
(
IDXGIFactory
*
iface
)
static
ULONG
STDMETHODCALLTYPE
dxgi_factory_AddRef
(
I
Wine
DXGIFactory
*
iface
)
{
struct
dxgi_factory
*
This
=
(
struct
dxgi_factory
*
)
iface
;
ULONG
refcount
=
InterlockedIncrement
(
&
This
->
refcount
);
...
...
@@ -55,7 +56,7 @@ static ULONG STDMETHODCALLTYPE dxgi_factory_AddRef(IDXGIFactory *iface)
return
refcount
;
}
static
ULONG
STDMETHODCALLTYPE
dxgi_factory_Release
(
IDXGIFactory
*
iface
)
static
ULONG
STDMETHODCALLTYPE
dxgi_factory_Release
(
I
Wine
DXGIFactory
*
iface
)
{
struct
dxgi_factory
*
This
=
(
struct
dxgi_factory
*
)
iface
;
ULONG
refcount
=
InterlockedDecrement
(
&
This
->
refcount
);
...
...
@@ -64,6 +65,9 @@ static ULONG STDMETHODCALLTYPE dxgi_factory_Release(IDXGIFactory *iface)
if
(
!
refcount
)
{
EnterCriticalSection
(
&
dxgi_cs
);
IWineD3D_Release
(
This
->
wined3d
);
LeaveCriticalSection
(
&
dxgi_cs
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
@@ -72,7 +76,7 @@ static ULONG STDMETHODCALLTYPE dxgi_factory_Release(IDXGIFactory *iface)
/* IDXGIObject methods */
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_SetPrivateData
(
IDXGIFactory
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_SetPrivateData
(
I
Wine
DXGIFactory
*
iface
,
REFGUID
guid
,
UINT
data_size
,
const
void
*
data
)
{
FIXME
(
"iface %p, guid %s, data_size %u, data %p stub!
\n
"
,
iface
,
debugstr_guid
(
guid
),
data_size
,
data
);
...
...
@@ -80,7 +84,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_SetPrivateData(IDXGIFactory *iface
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_SetPrivateDataInterface
(
IDXGIFactory
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_SetPrivateDataInterface
(
I
Wine
DXGIFactory
*
iface
,
REFGUID
guid
,
const
IUnknown
*
object
)
{
FIXME
(
"iface %p, guid %s, object %p stub!
\n
"
,
iface
,
debugstr_guid
(
guid
),
object
);
...
...
@@ -88,7 +92,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_SetPrivateDataInterface(IDXGIFacto
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_GetPrivateData
(
IDXGIFactory
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_GetPrivateData
(
I
Wine
DXGIFactory
*
iface
,
REFGUID
guid
,
UINT
*
data_size
,
void
*
data
)
{
FIXME
(
"iface %p, guid %s, data_size %p, data %p stub!
\n
"
,
iface
,
debugstr_guid
(
guid
),
data_size
,
data
);
...
...
@@ -96,7 +100,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_GetPrivateData(IDXGIFactory *iface
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_GetParent
(
IDXGIFactory
*
iface
,
REFIID
riid
,
void
**
parent
)
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_GetParent
(
I
Wine
DXGIFactory
*
iface
,
REFIID
riid
,
void
**
parent
)
{
FIXME
(
"iface %p, riid %s, parent %p stub!
\n
"
,
iface
,
debugstr_guid
(
riid
),
parent
);
...
...
@@ -105,28 +109,29 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_GetParent(IDXGIFactory *iface, REF
/* IDXGIFactory methods */
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_EnumAdapters
(
IDXGIFactory
*
iface
,
UINT
adapter_idx
,
IDXGIAdapter
**
adapter
)
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_EnumAdapters
(
IWineDXGIFactory
*
iface
,
UINT
adapter_idx
,
IDXGIAdapter
**
adapter
)
{
FIXME
(
"iface %p, adapter_idx %u, adapter %p stub!
\n
"
,
iface
,
adapter_idx
,
adapter
);
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_MakeWindowAssociation
(
IDXGIFactory
*
iface
,
HWND
window
,
UINT
flags
)
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_MakeWindowAssociation
(
I
Wine
DXGIFactory
*
iface
,
HWND
window
,
UINT
flags
)
{
FIXME
(
"iface %p, window %p, flags %#x stub!
\n\n
"
,
iface
,
window
,
flags
);
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_GetWindowAssociation
(
IDXGIFactory
*
iface
,
HWND
*
window
)
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_GetWindowAssociation
(
I
Wine
DXGIFactory
*
iface
,
HWND
*
window
)
{
FIXME
(
"iface %p, window %p stub!
\n
"
,
iface
,
window
);
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_CreateSwapChain
(
IDXGIFactory
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_CreateSwapChain
(
I
Wine
DXGIFactory
*
iface
,
IUnknown
*
device
,
DXGI_SWAP_CHAIN_DESC
*
desc
,
IDXGISwapChain
**
swapchain
)
{
struct
dxgi_swapchain
*
object
;
...
...
@@ -149,7 +154,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChain(IDXGIFactory *ifac
return
S_OK
;
}
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_CreateSoftwareAdapter
(
IDXGIFactory
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_CreateSoftwareAdapter
(
I
Wine
DXGIFactory
*
iface
,
HMODULE
swrast
,
IDXGIAdapter
**
adapter
)
{
FIXME
(
"iface %p, swrast %p, adapter %p stub!
\n
"
,
iface
,
swrast
,
adapter
);
...
...
@@ -157,7 +162,21 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSoftwareAdapter(IDXGIFactory
return
E_NOTIMPL
;
}
const
struct
IDXGIFactoryVtbl
dxgi_factory_vtbl
=
/* IWineDXGIFactory methods */
static
IWineD3D
*
STDMETHODCALLTYPE
dxgi_factory_get_wined3d
(
IWineDXGIFactory
*
iface
)
{
struct
dxgi_factory
*
This
=
(
struct
dxgi_factory
*
)
iface
;
TRACE
(
"iface %p
\n
"
,
iface
);
EnterCriticalSection
(
&
dxgi_cs
);
IWineD3D_AddRef
(
This
->
wined3d
);
LeaveCriticalSection
(
&
dxgi_cs
);
return
This
->
wined3d
;
}
const
struct
IWineDXGIFactoryVtbl
dxgi_factory_vtbl
=
{
/* IUnknown methods */
dxgi_factory_QueryInterface
,
...
...
@@ -174,4 +193,6 @@ const struct IDXGIFactoryVtbl dxgi_factory_vtbl =
dxgi_factory_GetWindowAssociation
,
dxgi_factory_CreateSwapChain
,
dxgi_factory_CreateSoftwareAdapter
,
/* IWineDXGIFactory methods */
dxgi_factory_get_wined3d
,
};
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