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
38982ddf
Commit
38982ddf
authored
Oct 03, 2011
by
Ričardas Barkauskas
Committed by
Alexandre Julliard
Oct 04, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Use unsafe_impl_from_IDirect3DViewport2 for application provided interfaces.
parent
25bf0e91
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
ddraw_private.h
dlls/ddraw/ddraw_private.h
+1
-0
device.c
dlls/ddraw/device.c
+4
-4
viewport.c
dlls/ddraw/viewport.c
+8
-0
No files found.
dlls/ddraw/ddraw_private.h
View file @
38982ddf
...
...
@@ -470,6 +470,7 @@ struct IDirect3DViewportImpl
};
IDirect3DViewportImpl
*
unsafe_impl_from_IDirect3DViewport3
(
IDirect3DViewport3
*
iface
)
DECLSPEC_HIDDEN
;
IDirect3DViewportImpl
*
unsafe_impl_from_IDirect3DViewport2
(
IDirect3DViewport2
*
iface
)
DECLSPEC_HIDDEN
;
IDirect3DViewportImpl
*
unsafe_impl_from_IDirect3DViewport
(
IDirect3DViewport
*
iface
)
DECLSPEC_HIDDEN
;
/* Helper functions */
...
...
dlls/ddraw/device.c
View file @
38982ddf
...
...
@@ -771,7 +771,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_2_AddViewport(IDirect3DDevice2 *iface,
IDirect3DViewport2
*
Direct3DViewport2
)
{
IDirect3DDeviceImpl
*
This
=
device_from_device2
(
iface
);
IDirect3DViewportImpl
*
vp
=
(
IDirect3DViewportImpl
*
)
Direct3DViewport2
;
IDirect3DViewportImpl
*
vp
=
unsafe_impl_from_IDirect3DViewport2
(
Direct3DViewport2
)
;
TRACE
(
"iface %p, viewport %p.
\n
"
,
iface
,
Direct3DViewport2
);
...
...
@@ -832,7 +832,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_2_DeleteViewport(IDirect3DDevice2 *ifa
IDirect3DViewport2
*
Direct3DViewport2
)
{
IDirect3DDeviceImpl
*
This
=
device_from_device2
(
iface
);
IDirect3DViewportImpl
*
vp
=
(
IDirect3DViewportImpl
*
)
Direct3DViewport2
;
IDirect3DViewportImpl
*
vp
=
unsafe_impl_from_IDirect3DViewport2
(
Direct3DViewport2
)
;
TRACE
(
"iface %p, viewport %p.
\n
"
,
iface
,
Direct3DViewport2
);
...
...
@@ -927,7 +927,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_2_NextViewport(IDirect3DDevice2 *iface
IDirect3DViewport2
*
Viewport2
,
IDirect3DViewport2
**
lplpDirect3DViewport2
,
DWORD
Flags
)
{
IDirect3DDeviceImpl
*
This
=
device_from_device2
(
iface
);
IDirect3DViewportImpl
*
vp
=
(
IDirect3DViewportImpl
*
)
Viewport2
;
IDirect3DViewportImpl
*
vp
=
unsafe_impl_from_IDirect3DViewport2
(
Viewport2
)
;
IDirect3DViewport3
*
res
;
HRESULT
hr
;
...
...
@@ -1749,7 +1749,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_2_SetCurrentViewport(IDirect3DDevice2
IDirect3DViewport2
*
Direct3DViewport2
)
{
IDirect3DDeviceImpl
*
This
=
device_from_device2
(
iface
);
IDirect3DViewportImpl
*
vp
=
(
IDirect3DViewportImpl
*
)
Direct3DViewport2
;
IDirect3DViewportImpl
*
vp
=
unsafe_impl_from_IDirect3DViewport2
(
Direct3DViewport2
)
;
TRACE
(
"iface %p, viewport %p.
\n
"
,
iface
,
Direct3DViewport2
);
...
...
dlls/ddraw/viewport.c
View file @
38982ddf
...
...
@@ -1127,6 +1127,14 @@ IDirect3DViewportImpl *unsafe_impl_from_IDirect3DViewport3(IDirect3DViewport3 *i
return
CONTAINING_RECORD
(
iface
,
IDirect3DViewportImpl
,
IDirect3DViewport3_iface
);
}
IDirect3DViewportImpl
*
unsafe_impl_from_IDirect3DViewport2
(
IDirect3DViewport2
*
iface
)
{
/* IDirect3DViewport and IDirect3DViewport3 use the same iface. */
if
(
!
iface
)
return
NULL
;
assert
(
iface
->
lpVtbl
==
(
IDirect3DViewport2Vtbl
*
)
&
d3d_viewport_vtbl
);
return
CONTAINING_RECORD
(
iface
,
IDirect3DViewportImpl
,
IDirect3DViewport3_iface
);
}
IDirect3DViewportImpl
*
unsafe_impl_from_IDirect3DViewport
(
IDirect3DViewport
*
iface
)
{
/* IDirect3DViewport and IDirect3DViewport3 use the same iface. */
...
...
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