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
27063ffe
Commit
27063ffe
authored
Jun 09, 2011
by
Ričardas Barkauskas
Committed by
Alexandre Julliard
Jun 10, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Use unsafe_impl_from_IDirectDrawSurface() for application provided interfaces.
parent
a8ee7c5e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
5 deletions
+13
-5
ddraw.c
dlls/ddraw/ddraw.c
+4
-4
ddraw_private.h
dlls/ddraw/ddraw_private.h
+1
-0
device.c
dlls/ddraw/device.c
+1
-1
surface.c
dlls/ddraw/surface.c
+7
-0
No files found.
dlls/ddraw/ddraw.c
View file @
27063ffe
...
...
@@ -4266,7 +4266,7 @@ static HRESULT WINAPI ddraw3_DuplicateSurface(IDirectDraw3 *iface, IDirectDrawSu
IDirectDrawSurface
**
dst
)
{
IDirectDrawImpl
*
This
=
impl_from_IDirectDraw3
(
iface
);
IDirectDrawSurfaceImpl
*
src_impl
=
unsafe_impl_from_IDirectDrawSurface
3
((
IDirectDrawSurface3
*
)
src
);
IDirectDrawSurfaceImpl
*
src_impl
=
unsafe_impl_from_IDirectDrawSurface
(
src
);
IDirectDrawSurface7
*
dst7
;
IDirectDrawSurfaceImpl
*
dst_impl
;
HRESULT
hr
;
...
...
@@ -4286,7 +4286,7 @@ static HRESULT WINAPI ddraw2_DuplicateSurface(IDirectDraw2 *iface,
IDirectDrawSurface
*
src
,
IDirectDrawSurface
**
dst
)
{
IDirectDrawImpl
*
This
=
impl_from_IDirectDraw2
(
iface
);
IDirectDrawSurfaceImpl
*
src_impl
=
unsafe_impl_from_IDirectDrawSurface
3
((
IDirectDrawSurface3
*
)
src
);
IDirectDrawSurfaceImpl
*
src_impl
=
unsafe_impl_from_IDirectDrawSurface
(
src
);
IDirectDrawSurface7
*
dst7
;
IDirectDrawSurfaceImpl
*
dst_impl
;
HRESULT
hr
;
...
...
@@ -4306,7 +4306,7 @@ static HRESULT WINAPI ddraw1_DuplicateSurface(IDirectDraw *iface, IDirectDrawSur
IDirectDrawSurface
**
dst
)
{
IDirectDrawImpl
*
This
=
impl_from_IDirectDraw
(
iface
);
IDirectDrawSurfaceImpl
*
src_impl
=
unsafe_impl_from_IDirectDrawSurface
3
((
IDirectDrawSurface3
*
)
src
);
IDirectDrawSurfaceImpl
*
src_impl
=
unsafe_impl_from_IDirectDrawSurface
(
src
);
IDirectDrawSurface7
*
dst7
;
IDirectDrawSurfaceImpl
*
dst_impl
;
HRESULT
hr
;
...
...
@@ -4906,7 +4906,7 @@ static HRESULT WINAPI d3d2_CreateDevice(IDirect3D2 *iface, REFCLSID riid,
IDirectDrawSurface
*
surface
,
IDirect3DDevice2
**
device
)
{
IDirectDrawImpl
*
This
=
impl_from_IDirect3D2
(
iface
);
IDirectDrawSurfaceImpl
*
surface_impl
=
unsafe_impl_from_IDirectDrawSurface
3
((
IDirectDrawSurface3
*
)
surface
);
IDirectDrawSurfaceImpl
*
surface_impl
=
unsafe_impl_from_IDirectDrawSurface
(
surface
);
HRESULT
hr
;
TRACE
(
"iface %p, riid %s, surface %p, device %p.
\n
"
,
...
...
dlls/ddraw/ddraw_private.h
View file @
27063ffe
...
...
@@ -242,6 +242,7 @@ static inline IDirectDrawSurfaceImpl *impl_from_IDirectDrawSurface7(IDirectDrawS
return
CONTAINING_RECORD
(
iface
,
IDirectDrawSurfaceImpl
,
IDirectDrawSurface7_iface
);
}
IDirectDrawSurfaceImpl
*
unsafe_impl_from_IDirectDrawSurface
(
IDirectDrawSurface
*
iface
)
DECLSPEC_HIDDEN
;
IDirectDrawSurfaceImpl
*
unsafe_impl_from_IDirectDrawSurface2
(
IDirectDrawSurface2
*
iface
)
DECLSPEC_HIDDEN
;
IDirectDrawSurfaceImpl
*
unsafe_impl_from_IDirectDrawSurface3
(
IDirectDrawSurface3
*
iface
)
DECLSPEC_HIDDEN
;
IDirectDrawSurfaceImpl
*
unsafe_impl_from_IDirectDrawSurface4
(
IDirectDrawSurface4
*
iface
)
DECLSPEC_HIDDEN
;
...
...
dlls/ddraw/device.c
View file @
27063ffe
...
...
@@ -1901,7 +1901,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_2_SetRenderTarget(IDirect3DDevice2 *if
IDirectDrawSurface
*
NewRenderTarget
,
DWORD
Flags
)
{
IDirect3DDeviceImpl
*
This
=
device_from_device2
(
iface
);
IDirectDrawSurfaceImpl
*
Target
=
unsafe_impl_from_IDirectDrawSurface
3
((
IDirectDrawSurface3
*
)
NewRenderTarget
);
IDirectDrawSurfaceImpl
*
Target
=
unsafe_impl_from_IDirectDrawSurface
(
NewRenderTarget
);
TRACE
(
"iface %p, target %p, flags %#x.
\n
"
,
iface
,
NewRenderTarget
,
Flags
);
...
...
dlls/ddraw/surface.c
View file @
27063ffe
...
...
@@ -4421,6 +4421,13 @@ IDirectDrawSurfaceImpl *unsafe_impl_from_IDirectDrawSurface2(IDirectDrawSurface2
return
CONTAINING_RECORD
(
iface
,
IDirectDrawSurfaceImpl
,
IDirectDrawSurface2_iface
);
}
IDirectDrawSurfaceImpl
*
unsafe_impl_from_IDirectDrawSurface
(
IDirectDrawSurface
*
iface
)
{
if
(
!
iface
)
return
NULL
;
assert
(
iface
->
lpVtbl
==
(
struct
IDirectDrawSurfaceVtbl
*
)
&
ddraw_surface3_vtbl
);
return
CONTAINING_RECORD
(
iface
,
IDirectDrawSurfaceImpl
,
IDirectDrawSurface3_iface
);
}
static
void
STDMETHODCALLTYPE
ddraw_surface_wined3d_object_destroyed
(
void
*
parent
)
{
IDirectDrawSurfaceImpl
*
surface
=
parent
;
...
...
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