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
25bf0e91
Commit
25bf0e91
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_IDirect3DViewport for application provided interfaces.
parent
6253d319
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 @
25bf0e91
...
...
@@ -470,6 +470,7 @@ struct IDirect3DViewportImpl
};
IDirect3DViewportImpl
*
unsafe_impl_from_IDirect3DViewport3
(
IDirect3DViewport3
*
iface
)
DECLSPEC_HIDDEN
;
IDirect3DViewportImpl
*
unsafe_impl_from_IDirect3DViewport
(
IDirect3DViewport
*
iface
)
DECLSPEC_HIDDEN
;
/* Helper functions */
void
viewport_activate
(
IDirect3DViewportImpl
*
This
,
BOOL
ignore_lights
)
DECLSPEC_HIDDEN
;
...
...
dlls/ddraw/device.c
View file @
25bf0e91
...
...
@@ -712,7 +712,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_1_Execute(IDirect3DDevice *iface,
{
IDirect3DDeviceImpl
*
This
=
device_from_device1
(
iface
);
IDirect3DExecuteBufferImpl
*
buffer
=
unsafe_impl_from_IDirect3DExecuteBuffer
(
ExecuteBuffer
);
IDirect3DViewportImpl
*
Direct3DViewportImpl
=
(
IDirect3DViewportImpl
*
)
Viewport
;
IDirect3DViewportImpl
*
Direct3DViewportImpl
=
unsafe_impl_from_IDirect3DViewport
(
Viewport
)
;
HRESULT
hr
;
TRACE
(
"iface %p, buffer %p, viewport %p, flags %#x.
\n
"
,
iface
,
ExecuteBuffer
,
Viewport
,
Flags
);
...
...
@@ -782,7 +782,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_1_AddViewport(IDirect3DDevice *iface,
IDirect3DViewport
*
Direct3DViewport
)
{
IDirect3DDeviceImpl
*
This
=
device_from_device1
(
iface
);
IDirect3DViewportImpl
*
vp
=
(
IDirect3DViewportImpl
*
)
Direct3DViewport
;
IDirect3DViewportImpl
*
vp
=
unsafe_impl_from_IDirect3DViewport
(
Direct3DViewport
)
;
TRACE
(
"iface %p, viewport %p.
\n
"
,
iface
,
Direct3DViewport
);
...
...
@@ -843,7 +843,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_1_DeleteViewport(IDirect3DDevice *ifac
IDirect3DViewport
*
Direct3DViewport
)
{
IDirect3DDeviceImpl
*
This
=
device_from_device1
(
iface
);
IDirect3DViewportImpl
*
vp
=
(
IDirect3DViewportImpl
*
)
Direct3DViewport
;
IDirect3DViewportImpl
*
vp
=
unsafe_impl_from_IDirect3DViewport
(
Direct3DViewport
)
;
TRACE
(
"iface %p, viewport %p.
\n
"
,
iface
,
Direct3DViewport
);
...
...
@@ -944,7 +944,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_1_NextViewport(IDirect3DDevice *iface,
IDirect3DViewport
*
Viewport
,
IDirect3DViewport
**
lplpDirect3DViewport
,
DWORD
Flags
)
{
IDirect3DDeviceImpl
*
This
=
device_from_device1
(
iface
);
IDirect3DViewportImpl
*
vp
=
(
IDirect3DViewportImpl
*
)
Viewport
;
IDirect3DViewportImpl
*
vp
=
unsafe_impl_from_IDirect3DViewport
(
Viewport
)
;
IDirect3DViewport3
*
res
;
HRESULT
hr
;
...
...
dlls/ddraw/viewport.c
View file @
25bf0e91
...
...
@@ -1127,6 +1127,14 @@ IDirect3DViewportImpl *unsafe_impl_from_IDirect3DViewport3(IDirect3DViewport3 *i
return
CONTAINING_RECORD
(
iface
,
IDirect3DViewportImpl
,
IDirect3DViewport3_iface
);
}
IDirect3DViewportImpl
*
unsafe_impl_from_IDirect3DViewport
(
IDirect3DViewport
*
iface
)
{
/* IDirect3DViewport and IDirect3DViewport3 use the same iface. */
if
(
!
iface
)
return
NULL
;
assert
(
iface
->
lpVtbl
==
(
IDirect3DViewportVtbl
*
)
&
d3d_viewport_vtbl
);
return
CONTAINING_RECORD
(
iface
,
IDirect3DViewportImpl
,
IDirect3DViewport3_iface
);
}
void
d3d_viewport_init
(
IDirect3DViewportImpl
*
viewport
,
IDirectDrawImpl
*
ddraw
)
{
viewport
->
IDirect3DViewport3_iface
.
lpVtbl
=
&
d3d_viewport_vtbl
;
...
...
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