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
cbc3e998
Commit
cbc3e998
authored
Mar 27, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Store an implementation pointer to the d3d9 structure in IDirect3DDevice9Impl.
parent
22d3e6db
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
14 deletions
+9
-14
d3d9_private.h
dlls/d3d9/d3d9_private.h
+1
-1
device.c
dlls/d3d9/device.c
+8
-13
No files found.
dlls/d3d9/d3d9_private.h
View file @
cbc3e998
...
...
@@ -165,7 +165,7 @@ typedef struct IDirect3DDevice9Impl
struct
wined3d_device_parent
device_parent
;
LONG
ref
;
struct
wined3d_device
*
wined3d_device
;
IDirect3D9Ex
*
d3d_parent
;
struct
IDirect3D9Impl
*
d3d_parent
;
/* Avoids recursion with nested ReleaseRef to 0 */
BOOL
inDestruction
;
...
...
dlls/d3d9/device.c
View file @
cbc3e998
...
...
@@ -190,8 +190,6 @@ static HRESULT WINAPI IDirect3DDevice9Impl_QueryInterface(IDirect3DDevice9Ex *if
void
**
ppobj
)
{
IDirect3DDevice9Impl
*
This
=
impl_from_IDirect3DDevice9Ex
(
iface
);
IDirect3D9
*
d3d
;
IDirect3D9Impl
*
d3dimpl
;
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppobj
);
...
...
@@ -203,20 +201,16 @@ static HRESULT WINAPI IDirect3DDevice9Impl_QueryInterface(IDirect3DDevice9Ex *if
return
S_OK
;
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_IDirect3DDevice9Ex
))
{
/* Find out if the creating d3d9 interface was created with Direct3DCreate9Ex.
* It doesn't matter with which function the device was created.
*/
IDirect3DDevice9_GetDirect3D
(
iface
,
&
d3d
);
d3dimpl
=
(
IDirect3D9Impl
*
)
d3d
;
* It doesn't matter with which function the device was created. */
if
(
d3dimpl
->
extended
)
{
if
(
This
->
d3d_parent
->
extended
)
{
*
ppobj
=
iface
;
IDirect3DDevice9Ex_AddRef
((
IDirect3DDevice9Ex
*
)
*
ppobj
);
IDirect3D9_Release
(
d3d
);
TRACE
(
"Returning IDirect3DDevice9Ex interface at %p
\n
"
,
*
ppobj
);
return
S_OK
;
}
else
{
WARN
(
"IDirect3D9 instance wasn't created with CreateDirect3D9Ex, returning E_NOINTERFACE
\n
"
);
IDirect3D9_Release
(
d3d
);
*
ppobj
=
NULL
;
return
E_NOINTERFACE
;
}
...
...
@@ -265,7 +259,7 @@ static ULONG WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_Release(IDirect3DDevi
wined3d_device_decref
(
This
->
wined3d_device
);
wined3d_mutex_unlock
();
IDirect3D9
_Release
(
This
->
d3d_parent
);
IDirect3D9
Ex_Release
(
&
This
->
d3d_parent
->
IDirect3D9Ex_iface
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
@@ -325,7 +319,8 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetDirect3D(IDirect3DDevice9Ex *iface
return
D3DERR_INVALIDCALL
;
}
return
IDirect3D9Ex_QueryInterface
(
This
->
d3d_parent
,
&
IID_IDirect3D9
,
(
void
**
)
ppD3D9
);
return
IDirect3D9Ex_QueryInterface
(
&
This
->
d3d_parent
->
IDirect3D9Ex_iface
,
&
IID_IDirect3D9
,
(
void
**
)
ppD3D9
);
}
static
HRESULT
WINAPI
IDirect3DDevice9Impl_GetDeviceCaps
(
IDirect3DDevice9Ex
*
iface
,
D3DCAPS9
*
pCaps
)
...
...
@@ -3513,8 +3508,8 @@ HRESULT device_init(IDirect3DDevice9Impl *device, IDirect3D9Impl *parent, struct
return
E_OUTOFMEMORY
;
}
device
->
d3d_parent
=
&
parent
->
IDirect3D9Ex_iface
;
IDirect3D9_AddRef
(
device
->
d3d_parent
)
;
IDirect3D9Ex_AddRef
(
&
parent
->
IDirect3D9Ex_iface
)
;
device
->
d3d_parent
=
parent
;
return
D3D_OK
;
}
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