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
7dc08745
Commit
7dc08745
authored
Oct 17, 2011
by
Ričardas Barkauskas
Committed by
Alexandre Julliard
Oct 17, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Use impl_from_IDirect3DDevice7 for application provided interfaces.
parent
31cf68dd
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
3 deletions
+10
-3
ddraw.c
dlls/ddraw/ddraw.c
+2
-2
ddraw_private.h
dlls/ddraw/ddraw_private.h
+5
-0
device.c
dlls/ddraw/device.c
+0
-0
surface.c
dlls/ddraw/surface.c
+3
-1
No files found.
dlls/ddraw/ddraw.c
View file @
7dc08745
...
@@ -4352,7 +4352,7 @@ static HRESULT WINAPI d3d3_CreateDevice(IDirect3D3 *iface, REFCLSID riid,
...
@@ -4352,7 +4352,7 @@ static HRESULT WINAPI d3d3_CreateDevice(IDirect3D3 *iface, REFCLSID riid,
surface_impl
?
&
surface_impl
->
IDirectDrawSurface7_iface
:
NULL
,
device
?
&
device7
:
NULL
);
surface_impl
?
&
surface_impl
->
IDirectDrawSurface7_iface
:
NULL
,
device
?
&
device7
:
NULL
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
device_impl
=
(
IDirect3DDeviceImpl
*
)
device7
;
device_impl
=
impl_from_IDirect3DDevice7
(
device7
)
;
*
device
=
&
device_impl
->
IDirect3DDevice3_iface
;
*
device
=
&
device_impl
->
IDirect3DDevice3_iface
;
}
}
...
@@ -4375,7 +4375,7 @@ static HRESULT WINAPI d3d2_CreateDevice(IDirect3D2 *iface, REFCLSID riid,
...
@@ -4375,7 +4375,7 @@ static HRESULT WINAPI d3d2_CreateDevice(IDirect3D2 *iface, REFCLSID riid,
surface_impl
?
&
surface_impl
->
IDirectDrawSurface7_iface
:
NULL
,
device
?
&
device7
:
NULL
);
surface_impl
?
&
surface_impl
->
IDirectDrawSurface7_iface
:
NULL
,
device
?
&
device7
:
NULL
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
device_impl
=
(
IDirect3DDeviceImpl
*
)
device7
;
device_impl
=
impl_from_IDirect3DDevice7
(
device7
)
;
*
device
=
&
device_impl
->
IDirect3DDevice2_iface
;
*
device
=
&
device_impl
->
IDirect3DDevice2_iface
;
}
}
...
...
dlls/ddraw/ddraw_private.h
View file @
7dc08745
...
@@ -340,6 +340,11 @@ static inline IDirect3DDeviceImpl *impl_from_IDirect3DDevice3(IDirect3DDevice3 *
...
@@ -340,6 +340,11 @@ static inline IDirect3DDeviceImpl *impl_from_IDirect3DDevice3(IDirect3DDevice3 *
return
CONTAINING_RECORD
(
iface
,
IDirect3DDeviceImpl
,
IDirect3DDevice3_iface
);
return
CONTAINING_RECORD
(
iface
,
IDirect3DDeviceImpl
,
IDirect3DDevice3_iface
);
}
}
static
inline
IDirect3DDeviceImpl
*
impl_from_IDirect3DDevice7
(
IDirect3DDevice7
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirect3DDeviceImpl
,
lpVtbl
);
}
IDirect3DDeviceImpl
*
unsafe_impl_from_IDirect3DDevice
(
IDirect3DDevice
*
iface
)
DECLSPEC_HIDDEN
;
IDirect3DDeviceImpl
*
unsafe_impl_from_IDirect3DDevice
(
IDirect3DDevice
*
iface
)
DECLSPEC_HIDDEN
;
IDirect3DDeviceImpl
*
unsafe_impl_from_IDirect3DDevice2
(
IDirect3DDevice2
*
iface
)
DECLSPEC_HIDDEN
;
IDirect3DDeviceImpl
*
unsafe_impl_from_IDirect3DDevice2
(
IDirect3DDevice2
*
iface
)
DECLSPEC_HIDDEN
;
IDirect3DDeviceImpl
*
unsafe_impl_from_IDirect3DDevice3
(
IDirect3DDevice3
*
iface
)
DECLSPEC_HIDDEN
;
IDirect3DDeviceImpl
*
unsafe_impl_from_IDirect3DDevice3
(
IDirect3DDevice3
*
iface
)
DECLSPEC_HIDDEN
;
...
...
dlls/ddraw/device.c
View file @
7dc08745
This diff is collapsed.
Click to expand it.
dlls/ddraw/surface.c
View file @
7dc08745
...
@@ -127,6 +127,7 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface,
...
@@ -127,6 +127,7 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface,
IsEqualGUID
(
riid
,
&
IID_IDirect3DRGBDevice
)
)
IsEqualGUID
(
riid
,
&
IID_IDirect3DRGBDevice
)
)
{
{
IDirect3DDevice7
*
d3d
;
IDirect3DDevice7
*
d3d
;
IDirect3DDeviceImpl
*
device_impl
;
/* Call into IDirect3D7 for creation */
/* Call into IDirect3D7 for creation */
IDirect3D7_CreateDevice
(
&
This
->
ddraw
->
IDirect3D7_iface
,
riid
,
&
This
->
IDirectDrawSurface7_iface
,
IDirect3D7_CreateDevice
(
&
This
->
ddraw
->
IDirect3D7_iface
,
riid
,
&
This
->
IDirectDrawSurface7_iface
,
...
@@ -134,7 +135,8 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface,
...
@@ -134,7 +135,8 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface,
if
(
d3d
)
if
(
d3d
)
{
{
*
obj
=
&
((
IDirect3DDeviceImpl
*
)
d3d
)
->
IDirect3DDevice_iface
;
device_impl
=
impl_from_IDirect3DDevice7
(
d3d
);
*
obj
=
&
device_impl
->
IDirect3DDevice_iface
;
TRACE
(
"(%p) Returning IDirect3DDevice interface at %p
\n
"
,
This
,
*
obj
);
TRACE
(
"(%p) Returning IDirect3DDevice interface at %p
\n
"
,
This
,
*
obj
);
return
S_OK
;
return
S_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